add remove ability

This commit is contained in:
Arnaud Jamin
2023-10-10 11:26:37 -04:00
parent 2d5e764e19
commit 91a18306e4
14 changed files with 122 additions and 61 deletions
@@ -7,7 +7,7 @@
void UCogEngineWindow_DebugSettings::RenderHelp()
{
ImGui::Text(
"This window can be used to setup how the debug display is drawn. "
"This window can be used to tweak how the debug display is drawn. "
"Check each item for more info. "
);
}
@@ -6,32 +6,6 @@
char ImGuiTextBuffer::EmptyString[1] = { 0 };
//--------------------------------------------------------------------------------------------------------------------------
// FCogLogOutputDevice
//--------------------------------------------------------------------------------------------------------------------------
UCogLogOutputDevice::UCogLogOutputDevice()
{
GLog->AddOutputDevice(this);
}
//--------------------------------------------------------------------------------------------------------------------------
UCogLogOutputDevice::~UCogLogOutputDevice()
{
if (GLog != nullptr)
{
GLog->RemoveOutputDevice(this);
}
}
//--------------------------------------------------------------------------------------------------------------------------
void UCogLogOutputDevice::Serialize(const TCHAR* Message, ELogVerbosity::Type Verbosity, const class FName& Category)
{
if (OutputLog != nullptr)
{
OutputLog->AddLog(Message, Verbosity, Category);
}
}
//--------------------------------------------------------------------------------------------------------------------------
// FCogWindow_Log
//--------------------------------------------------------------------------------------------------------------------------
@@ -302,3 +276,29 @@ void UCogEngineWindow_OutputLog::RenderContent()
ImGui::EndChild();
}
}
//--------------------------------------------------------------------------------------------------------------------------
// FCogLogOutputDevice
//--------------------------------------------------------------------------------------------------------------------------
UCogLogOutputDevice::UCogLogOutputDevice()
{
GLog->AddOutputDevice(this);
}
//--------------------------------------------------------------------------------------------------------------------------
UCogLogOutputDevice::~UCogLogOutputDevice()
{
if (GLog != nullptr)
{
GLog->RemoveOutputDevice(this);
}
}
//--------------------------------------------------------------------------------------------------------------------------
void UCogLogOutputDevice::Serialize(const TCHAR* Message, ELogVerbosity::Type Verbosity, const class FName& Category)
{
if (OutputLog != nullptr)
{
OutputLog->AddLog(Message, Verbosity, Category);
}
}
@@ -11,6 +11,17 @@ UCogEngineWindow_Skeleton::UCogEngineWindow_Skeleton()
bHasMenu = true;
}
//--------------------------------------------------------------------------------------------------------------------------
void UCogEngineWindow_Skeleton::RenderHelp()
{
ImGui::Text(
"This window display the bone hierarchy and the skeleton debug draw of the selected actor if it has a Skeletal Mesh. "
"Mouse over a bone to highlight it. "
"Right click a bone to access more debug display. "
"Use the [Ctrl] key to toggle the bone debug draw recursively. "
);
}
//--------------------------------------------------------------------------------------------------------------------------
void UCogEngineWindow_Skeleton::OnSelectionChanged(AActor* OldSelection, AActor* NewSelection)
{
@@ -31,11 +31,14 @@ class COGENGINE_API UCogEngineWindow_Skeleton : public UCogWindow
public:
UCogEngineWindow_Skeleton();
virtual void RenderContent() override;
virtual void RenderTick(float DeltaTime) override;
virtual void RenderHelp() override;
protected:
virtual void RenderContent() override;
virtual void RenderTick(float DeltaTime) override;
virtual void OnSelectionChanged(AActor* OldSelection, AActor* NewSelection) override;
private: