Refactor menu states and shortcuts in GMainWindow. (#7419)

Refactor menu states and shortcuts in GMainWindow.

- Removed "Start", since it was always disabled unless it was "Continue"
which has now been moved to "Pause".
- Allow hotkeys to be used while in fullscreen.
- Removed the load amiibo hotkey.
This commit is contained in:
Adam Heinermann
2021-11-24 18:27:25 -08:00
committed by GitHub
parent cd6cf0422d
commit f078d3d212
3 changed files with 173 additions and 235 deletions

View File

@ -191,6 +191,7 @@ private:
void ConnectWidgetEvents();
void ConnectMenuEvents();
void UpdateMenuState();
void PreventOSSleep();
void AllowOSSleep();
@ -240,7 +241,9 @@ private:
private slots:
void OnStartGame();
void OnRestartGame();
void OnPauseGame();
void OnPauseContinueGame();
void OnStopGame();
void OnMenuReportCompatibility();
void OnOpenModsPage();
@ -294,6 +297,9 @@ private slots:
void OnMouseActivity();
private:
/// Updates an action's shortcut and text to reflect an updated hotkey from the hotkey registry.
void LinkActionShortcut(QAction* action, const QString& action_name);
void RemoveBaseContent(u64 program_id, const QString& entry_type);
void RemoveUpdateContent(u64 program_id, const QString& entry_type);
void RemoveAddOnContent(u64 program_id, const QString& entry_type);