@@ -1530,19 +1530,16 @@ void FullscreenUI::DrawLandingWindow()
1530
1530
QueueResetFocus (FocusResetType::WindowChanged);
1531
1531
}
1532
1532
}
1533
- EndHorizontalMenu ();
1534
-
1535
1533
ImGui::PopStyleColor ();
1536
1534
1537
- if (!AreAnyDialogsOpen ())
1538
- {
1539
- if (ImGui::IsKeyPressed (ImGuiKey_GamepadBack, false ) || ImGui::IsKeyPressed (ImGuiKey_F1, false ))
1540
- OpenAboutWindow ();
1541
- if (ImGui::IsKeyPressed (ImGuiKey_NavGamepadInput, false ) || ImGui::IsKeyPressed (ImGuiKey_Space, false ))
1542
- SwitchToGameList ();
1543
- else if (ImGui::IsKeyPressed (ImGuiKey_NavGamepadMenu, false ) || ImGui::IsKeyPressed (ImGuiKey_F11, false ))
1544
- DoToggleFullscreen ();
1545
- }
1535
+ if (ImGui::Shortcut (ImGuiKey_GamepadBack) || ImGui::Shortcut (ImGuiKey_F1))
1536
+ OpenAboutWindow ();
1537
+ if (ImGui::Shortcut (ImGuiKey_NavGamepadInput) || ImGui::Shortcut (ImGuiKey_Space))
1538
+ SwitchToGameList ();
1539
+ else if (ImGui::Shortcut (ImGuiKey_NavGamepadMenu) || ImGui::Shortcut (ImGuiKey_F11))
1540
+ DoToggleFullscreen ();
1541
+
1542
+ EndHorizontalMenu ();
1546
1543
1547
1544
if (IsGamepadInputSource ())
1548
1545
{
@@ -1607,15 +1604,13 @@ void FullscreenUI::DrawStartGameWindow()
1607
1604
QueueResetFocus (FocusResetType::WindowChanged);
1608
1605
}
1609
1606
}
1610
- EndHorizontalMenu ();
1611
1607
1612
1608
ImGui::PopStyleColor ();
1613
1609
1614
- if (!AreAnyDialogsOpen ())
1615
- {
1616
- if (ImGui::IsKeyPressed (ImGuiKey_NavGamepadMenu, false ) || ImGui::IsKeyPressed (ImGuiKey_F1, false ))
1617
- OpenSaveStateSelector (true );
1618
- }
1610
+ if (ImGui::Shortcut (ImGuiKey_NavGamepadMenu) || ImGui::Shortcut (ImGuiKey_F1))
1611
+ OpenSaveStateSelector (true );
1612
+
1613
+ EndHorizontalMenu ();
1619
1614
1620
1615
if (IsGamepadInputSource ())
1621
1616
{
@@ -1838,7 +1833,7 @@ void FullscreenUI::DrawInputBindingButton(
1838
1833
{
1839
1834
BeginInputBinding (bsi, type, section, name, display_name);
1840
1835
}
1841
- else if (ImGui::IsItemClicked (ImGuiMouseButton_Right) || ImGui::IsKeyPressed (ImGuiKey_NavGamepadMenu, false ))
1836
+ else if (hovered && ( ImGui::IsItemClicked (ImGuiMouseButton_Right) || ImGui::Shortcut (ImGuiKey_NavGamepadMenu) ))
1842
1837
{
1843
1838
bsi->DeleteValue (section, name);
1844
1839
SetSettingsChanged (bsi);
@@ -6298,8 +6293,8 @@ void FullscreenUI::DrawSaveStateSelector(bool is_loading)
6298
6293
ReturnToMainWindow ();
6299
6294
break ;
6300
6295
}
6301
- else if (hovered && (ImGui::IsItemClicked (ImGuiMouseButton_Right) || ImGui::IsKeyPressed (ImGuiKey_NavGamepadMenu, false ) ||
6302
- ImGui::IsKeyPressed (ImGuiKey_F1, false )))
6296
+ else if (hovered && (ImGui::IsItemClicked (ImGuiMouseButton_Right) || ImGui::Shortcut (ImGuiKey_NavGamepadMenu) ||
6297
+ ImGui::Shortcut (ImGuiKey_F1)))
6303
6298
{
6304
6299
s_save_state_selector_submenu_index = static_cast <s32>(i);
6305
6300
}
@@ -6740,8 +6735,8 @@ void FullscreenUI::DrawGameList(const ImVec2& heading_size)
6740
6735
selected_entry = entry;
6741
6736
6742
6737
if (selected_entry &&
6743
- (ImGui::IsItemClicked (ImGuiMouseButton_Right) || ImGui::IsKeyPressed (ImGuiKey_NavGamepadMenu, false ) ||
6744
- ImGui::IsKeyPressed (ImGuiKey_F3, false )))
6738
+ (ImGui::IsItemClicked (ImGuiMouseButton_Right) || ImGui::Shortcut (ImGuiKey_NavGamepadMenu) ||
6739
+ ImGui::Shortcut (ImGuiKey_F3)))
6745
6740
{
6746
6741
HandleGameListOptions (selected_entry);
6747
6742
}
@@ -6966,8 +6961,8 @@ void FullscreenUI::DrawGameGrid(const ImVec2& heading_size)
6966
6961
{
6967
6962
HandleGameListActivate (entry);
6968
6963
}
6969
- else if (hovered && (ImGui::IsItemClicked (ImGuiMouseButton_Right) || ImGui::IsKeyPressed (ImGuiKey_NavGamepadMenu, false ) ||
6970
- ImGui::IsKeyPressed (ImGuiKey_F3, false )))
6964
+ else if (hovered && (ImGui::IsItemClicked (ImGuiMouseButton_Right) || ImGui::Shortcut (ImGuiKey_NavGamepadMenu) ||
6965
+ ImGui::Shortcut (ImGuiKey_F3)))
6971
6966
{
6972
6967
HandleGameListOptions (entry);
6973
6968
}
0 commit comments