|
group2 0.1.0
CSE 125 Group 2
|
Lightweight in-game pause overlay. More...
#include <PauseMenu.hpp>
Public Member Functions | |
| void | open () |
| Open the pause menu on its root page. | |
| void | close () |
| Close the pause menu and discard any transient settings UI state. | |
| bool | isOpen () const |
| Return true when the pause overlay is visible. | |
| bool | isSettingsOpen () const |
| Return true when the settings page is the active pause-menu page. | |
| bool | handleEscape (const UserSettings &settings) |
| Handle Escape according to the current menu page/listening state. | |
| bool | consumeEvent (const SDL_Event &event) |
| Consume SDL input events while the pause menu owns keyboard/mouse focus. | |
| PauseMenuResult | render (UserSettings &settings, std::string_view settingsPath) |
| Draw the pause/settings overlay and apply user settings when requested. | |
Private Types | |
| enum class | PendingConfirm { None , LeaveMatch , ExitDesktop } |
Private Member Functions | |
| void | openSettings (const UserSettings &settings) |
| Enter settings page with a draft copy of the current live settings. | |
Private Attributes | |
| bool | menuOpen = false |
| True when any pause overlay page is open. | |
| SettingsEditor | settingsEditor_ |
| Shared tabbed settings page. | |
| ConfirmModal | confirm_ |
| Reusable modal for destructive pause-menu actions. | |
| PendingConfirm | pendingConfirm_ = PendingConfirm::None |
| Action awaiting confirmation. | |
Lightweight in-game pause overlay.
|
strongprivate |
| void PauseMenu::close | ( | ) |
Close the pause menu and discard any transient settings UI state.
| bool PauseMenu::consumeEvent | ( | const SDL_Event & | event | ) |
Consume SDL input events while the pause menu owns keyboard/mouse focus.
| bool PauseMenu::handleEscape | ( | const UserSettings & | settings | ) |
Handle Escape according to the current menu page/listening state.
|
nodiscard |
Return true when the pause overlay is visible.
|
nodiscard |
Return true when the settings page is the active pause-menu page.
| void PauseMenu::open | ( | ) |
Open the pause menu on its root page.
|
private |
Enter settings page with a draft copy of the current live settings.
| PauseMenuResult PauseMenu::render | ( | UserSettings & | settings, |
| std::string_view | settingsPath ) |
Draw the pause/settings overlay and apply user settings when requested.
|
private |
Reusable modal for destructive pause-menu actions.
|
private |
True when any pause overlay page is open.
|
private |
Action awaiting confirmation.
|
private |
Shared tabbed settings page.