mirror of
https://github.com/Ed94/Cog.git
synced 2026-08-02 12:48:14 +00:00
cheats and window menu persistence
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user