mirror of
https://github.com/Ed94/Cog.git
synced 2026-06-13 08:02:23 -07:00
CogSample: Add a window with the Team of the selection.
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user