overlay: refactor overlay layering (#739)

## Link to GitHub Issue or related Pull Request, if one exists
n/a

## Description of change

Create three distinct layers for the overlay:

1. Bottommost persistent layer - non-interactable layer that is always
on. This was only for notifications, but now the FPS widget lives here
as well.
2. Overlay windows layer - most interactable windows go here.
3. Topmost main menu - this is reserved for the main menu (escape key)
and this is a modal dialog that occludes the layers below.

Why? 

- `toggle overlay` behavior with FPS widget *also* toggling on/off was a
bit confusing (now they're two separate keys)
- FPS widget is popular, but it caused the entire overlay to be active,
which affects how input is handled
- the main menu being a standalone window was a little awkward (now it's
a modal)

## Testing
This commit is contained in:
bicarus
2026-06-07 17:23:08 -07:00
committed by GitHub
parent bb87aa2944
commit 100caa0f5c
16 changed files with 348 additions and 102 deletions
+3 -1
View File
@@ -444,6 +444,8 @@ namespace games {
// overlay button definitions
names.emplace_back("Screenshot");
vkey_defaults.push_back(VK_SNAPSHOT);
names.emplace_back("Toggle All Windows");
vkey_defaults.push_back(VK_OEM_3); // backtick `
names.emplace_back("Toggle Main Menu");
vkey_defaults.push_back(VK_ESCAPE);
names.emplace_back("Toggle Sub Screen");
@@ -468,7 +470,7 @@ namespace games {
vkey_defaults.push_back(VK_F10);
names.emplace_back("Toggle Screen Resize");
vkey_defaults.push_back(VK_F11);
names.emplace_back("Toggle Overlay");
names.emplace_back("Toggle FPS");
vkey_defaults.push_back(VK_F12);
names.emplace_back("Toggle Camera Control");
vkey_defaults.push_back(0xFF);
+2 -1
View File
@@ -8,6 +8,7 @@ namespace games {
namespace OverlayButtons {
enum {
Screenshot,
ToggleAllWindows,
ToggleMainMenu,
ToggleSubScreen,
InsertCoin,
@@ -20,7 +21,7 @@ namespace games {
ToggleControl,
TogglePatchManager,
ToggleScreenResize,
ToggleOverlay,
ToggleFps,
ToggleCameraControl,
TriggerPinMacroP1,
TriggerPinMacroP2,