FullscreenUI: Fix debug menu being occluded
This commit is contained in:
parent
520b64e711
commit
bc9ca302b8
|
@ -1128,7 +1128,7 @@ void DrawSettingsWindow()
|
||||||
"resume directly from where you left off next time.",
|
"resume directly from where you left off next time.",
|
||||||
&s_settings_copy.save_state_on_exit);
|
&s_settings_copy.save_state_on_exit);
|
||||||
settings_changed |=
|
settings_changed |=
|
||||||
ToggleButton("Start Fullscreen", "Automatically switches to fullscreen mode when a game is started.",
|
ToggleButton("Start Fullscreen", "Automatically switches to fullscreen mode when the program is started.",
|
||||||
&s_settings_copy.start_fullscreen);
|
&s_settings_copy.start_fullscreen);
|
||||||
settings_changed |=
|
settings_changed |=
|
||||||
ToggleButton("Load Devices From Save States",
|
ToggleButton("Load Devices From Save States",
|
||||||
|
@ -3118,7 +3118,7 @@ bool DrawConfirmWindow(const char* message, bool* result)
|
||||||
|
|
||||||
void SetDebugMenuAllowed(bool allowed)
|
void SetDebugMenuAllowed(bool allowed)
|
||||||
{
|
{
|
||||||
s_debug_menu_enabled = allowed;
|
s_debug_menu_allowed = allowed;
|
||||||
UpdateDebugMenuVisibility();
|
UpdateDebugMenuVisibility();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3126,6 +3126,7 @@ void SetDebugMenuEnabled(bool enabled)
|
||||||
{
|
{
|
||||||
s_host_interface->GetSettingsInterface()->SetBoolValue("Main", "ShowDebugMenu", enabled);
|
s_host_interface->GetSettingsInterface()->SetBoolValue("Main", "ShowDebugMenu", enabled);
|
||||||
s_host_interface->GetSettingsInterface()->Save();
|
s_host_interface->GetSettingsInterface()->Save();
|
||||||
|
UpdateDebugMenuVisibility();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateDebugMenuVisibility()
|
void UpdateDebugMenuVisibility()
|
||||||
|
@ -3431,9 +3432,8 @@ void DrawDebugSettingsMenu()
|
||||||
ImGui::EndMenu();
|
ImGui::EndMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool fullscreen = s_host_interface->IsFullscreen();
|
if (ImGui::MenuItem("Toggle Fullscreen"))
|
||||||
if (ImGui::MenuItem("Fullscreen", nullptr, &fullscreen))
|
s_host_interface->RunLater([] { s_host_interface->SetFullscreen(!s_host_interface->IsFullscreen()); });
|
||||||
s_host_interface->RunLater([fullscreen] { s_host_interface->SetFullscreen(fullscreen); });
|
|
||||||
|
|
||||||
if (ImGui::BeginMenu("Resize to Game", System::IsValid()))
|
if (ImGui::BeginMenu("Resize to Game", System::IsValid()))
|
||||||
{
|
{
|
||||||
|
|
|
@ -236,8 +236,8 @@ void EndLayout()
|
||||||
|
|
||||||
bool BeginFullscreenColumns(const char* title)
|
bool BeginFullscreenColumns(const char* title)
|
||||||
{
|
{
|
||||||
ImGui::SetNextWindowPos(ImVec2(g_layout_padding_left, 0.0f));
|
ImGui::SetNextWindowPos(ImVec2(g_layout_padding_left, s_menu_bar_size));
|
||||||
ImGui::SetNextWindowSize(ImVec2(LayoutScale(LAYOUT_SCREEN_WIDTH), ImGui::GetIO().DisplaySize.y));
|
ImGui::SetNextWindowSize(ImVec2(LayoutScale(LAYOUT_SCREEN_WIDTH), ImGui::GetIO().DisplaySize.y - s_menu_bar_size));
|
||||||
|
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f));
|
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f));
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_WindowBorderSize, 0.0f);
|
ImGui::PushStyleVar(ImGuiStyleVar_WindowBorderSize, 0.0f);
|
||||||
|
@ -268,7 +268,7 @@ void EndFullscreenColumns()
|
||||||
bool BeginFullscreenColumnWindow(float start, float end, const char* name, const ImVec4& background)
|
bool BeginFullscreenColumnWindow(float start, float end, const char* name, const ImVec4& background)
|
||||||
{
|
{
|
||||||
const ImVec2 pos(LayoutScale(start), 0.0f);
|
const ImVec2 pos(LayoutScale(start), 0.0f);
|
||||||
const ImVec2 size(LayoutScale(end - start), ImGui::GetIO().DisplaySize.y);
|
const ImVec2 size(LayoutScale(end - start), ImGui::GetIO().DisplaySize.y - s_menu_bar_size);
|
||||||
|
|
||||||
ImGui::PushStyleColor(ImGuiCol_ChildBg, background);
|
ImGui::PushStyleColor(ImGuiCol_ChildBg, background);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue