cheats and window menu persistence

This commit is contained in:
Arnaud Jamin
2023-10-10 02:10:18 -04:00
parent c9a3013bb9
commit 2d5e764e19
32 changed files with 154 additions and 85 deletions
@@ -56,6 +56,11 @@ void UCogWindow::Render(float DeltaTime)
const FString WindowTitle = GetTitle() + "##" + Name;
if (bHasMenu && bHideMenu == false)
{
WindowFlags |= ImGuiWindowFlags_MenuBar;
}
if (ImGui::Begin(TCHAR_TO_ANSI(*WindowTitle), &bIsVisible, WindowFlags))
{
if (Owner->GetShowHelp())
@@ -77,6 +82,16 @@ void UCogWindow::Render(float DeltaTime)
}
}
if (bHasMenu)
{
if (ImGui::BeginPopupContextWindow())
{
ImGui::Checkbox("Hide Menu", &bHideMenu);
ImGui::EndPopup();
}
}
RenderContent();
ImGui::End();
}
@@ -77,12 +77,17 @@ protected:
ULocalPlayer* GetLocalPlayer();
UPROPERTY(Config)
bool bHasMenu = false;
private:
bool bIsVisible = false;
bool bShowInsideMenu = true;
bool bHideMenu = false;
ImGuiID ID;
FString FullName;