fix scale replication and other fixes

This commit is contained in:
Arnaud Jamin
2023-10-13 00:37:07 -04:00
parent 762167e3c2
commit 7b0ed3d05f
14 changed files with 477 additions and 119 deletions
@@ -82,20 +82,20 @@ void UCogWindow::Render(float DeltaTime)
}
}
if (bHasMenu)
if (ImGui::BeginPopupContextWindow())
{
if (ImGui::BeginPopupContextWindow())
if (bHasMenu)
{
ImGui::Checkbox("Hide Menu", &bHideMenu);
if (ImGui::Button("Reset"))
{
ResetConfig();
}
ImGui::EndPopup();
}
}
if (ImGui::Button("Reset"))
{
ResetConfig();
}
ImGui::EndPopup();
}
RenderContent();
ImGui::End();
@@ -24,12 +24,6 @@ void UCogWindow_Settings::PostInitProperties()
//--------------------------------------------------------------------------------------------------------------------------
void UCogWindow_Settings::RenderContent()
{
ImGui::Checkbox("Compact Mode", &GetOwner()->bCompactMode);
ImGui::Checkbox("Show Windows In Main Menu", &GetOwner()->bShowWindowsInMainMenu);
ImGui::Checkbox("Show Window Help", &GetOwner()->bShowHelp);
FCogWindowWidgets::SetNextItemToShortWidth();
ImGui::SliderFloat("DPI Scale", &GetOwner()->DPIScale, 0.5f, 2.0f, "%.1f");
if (ImGui::IsItemDeactivatedAfterEdit())
@@ -37,6 +31,12 @@ void UCogWindow_Settings::RenderContent()
GetOwner()->bRefreshDPIScale = true;
}
ImGui::Checkbox("Compact Mode", &GetOwner()->bCompactMode);
ImGui::Checkbox("Show Windows In Main Menu", &GetOwner()->bShowWindowsInMainMenu);
ImGui::Checkbox("Show Window Help", &GetOwner()->bShowHelp);
if (ImGui::IsItemHovered())
{
ImGui::BeginTooltip();