mirror of
https://github.com/Ed94/Cog.git
synced 2026-08-05 15:18:47 +00:00
CogSample: Add a window with the Team of the selection.
This commit is contained in:
@@ -44,6 +44,7 @@
|
|||||||
#include "CogInputWindow_Actions.h"
|
#include "CogInputWindow_Actions.h"
|
||||||
#include "CogInputWindow_Gamepad.h"
|
#include "CogInputWindow_Gamepad.h"
|
||||||
#include "CogSampleLogCategories.h"
|
#include "CogSampleLogCategories.h"
|
||||||
|
#include "CogSampleWindow_Team.h"
|
||||||
#include "CogWindowManager.h"
|
#include "CogWindowManager.h"
|
||||||
|
|
||||||
#include "GameFramework/GameUserSettings.h"
|
#include "GameFramework/GameUserSettings.h"
|
||||||
@@ -181,6 +182,8 @@ void ACogSampleGameState::InitializeCog()
|
|||||||
|
|
||||||
CogWindowManager->AddWindow<FCogAbilityWindow_OwnedTags>("Gameplay.Owned Tags");
|
CogWindowManager->AddWindow<FCogAbilityWindow_OwnedTags>("Gameplay.Owned Tags");
|
||||||
|
|
||||||
|
CogWindowManager->AddWindow<FCogSampleWindow_Team>("Gameplay.Team");
|
||||||
|
|
||||||
CogWindowManager->AddWindow<FCogAbilityWindow_Tweaks>("Gameplay.Tweaks");
|
CogWindowManager->AddWindow<FCogAbilityWindow_Tweaks>("Gameplay.Tweaks");
|
||||||
|
|
||||||
//---------------------------------------
|
//---------------------------------------
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
#include "CogSampleWindow_Team.h"
|
||||||
|
|
||||||
|
#if ENABLE_COG
|
||||||
|
|
||||||
|
#include "CogImguiHelper.h"
|
||||||
|
#include "CogWindowHelper.h"
|
||||||
|
#include "CogWindowWidgets.h"
|
||||||
|
#include "CogSampleTeamInterface.h"
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------------------------------
|
||||||
|
void FCogSampleWindow_Team::Initialize()
|
||||||
|
{
|
||||||
|
Super::Initialize();
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------------------------------
|
||||||
|
void FCogSampleWindow_Team::RenderHelp()
|
||||||
|
{
|
||||||
|
ImGui::Text("A window part of the sample project.");
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------------------------------
|
||||||
|
void FCogSampleWindow_Team::RenderContent()
|
||||||
|
{
|
||||||
|
Super::RenderContent();
|
||||||
|
|
||||||
|
if (ICogSampleTeamInterface* TeamInterface = Cast<ICogSampleTeamInterface>(GetSelection()))
|
||||||
|
{
|
||||||
|
int32 Team = TeamInterface->GetTeam();
|
||||||
|
if (ImGui::DragInt("Team", &Team, 0.1f, 0, 10))
|
||||||
|
{
|
||||||
|
TeamInterface->SetTeam(Team);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif //ENABLE_COG
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "CogCommon.h"
|
||||||
|
|
||||||
|
#if ENABLE_COG
|
||||||
|
|
||||||
|
#include "CogWindow.h"
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------------------------------
|
||||||
|
class FCogSampleWindow_Team : public FCogWindow
|
||||||
|
{
|
||||||
|
typedef FCogWindow Super;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
virtual void Initialize() override;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
virtual void RenderHelp() override;
|
||||||
|
|
||||||
|
virtual void RenderContent() override;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif //ENABLE_COG
|
||||||
@@ -5,6 +5,7 @@
|
|||||||
- CogWindow: Try to remove CogWindow dependency to cogimgui. Should only depends on imgui (currently use setdpiscale of cogimgui)
|
- CogWindow: Try to remove CogWindow dependency to cogimgui. Should only depends on imgui (currently use setdpiscale of cogimgui)
|
||||||
- CogWindow: Overlay window should have achnoring options (top bottom left right center mid)
|
- CogWindow: Overlay window should have achnoring options (top bottom left right center mid)
|
||||||
- CogWindow: Hide menu is not saved anymore
|
- CogWindow: Hide menu is not saved anymore
|
||||||
|
- CogWindow: DPI change on mousewheel should be a command with a key bind as the rest.
|
||||||
|
|
||||||
- CogEngine: More stats in the stats window
|
- CogEngine: More stats in the stats window
|
||||||
- CogEngine: Overlay mode of stats.
|
- CogEngine: Overlay mode of stats.
|
||||||
@@ -16,7 +17,7 @@
|
|||||||
- CogEngine: Improve collision window: Add Query Type, Single or Multi, By Channel or Object Type, Object Type.
|
- CogEngine: Improve collision window: Add Query Type, Single or Multi, By Channel or Object Type, Object Type.
|
||||||
- CogEngine: Add multi selection to the selection window actor filter (Character+GameState for example).
|
- CogEngine: Add multi selection to the selection window actor filter (Character+GameState for example).
|
||||||
|
|
||||||
- CogSample: Add a custom window in sample (changing the character faction)
|
- CogSample: Add more info in the team window
|
||||||
- CogSample: Create more abilities
|
- CogSample: Create more abilities
|
||||||
- CogSample: Push Model
|
- CogSample: Push Model
|
||||||
- CogSample: Add timescale game tweak
|
- CogSample: Add timescale game tweak
|
||||||
|
|||||||
Reference in New Issue
Block a user