diff options
| author | Hannes Schulze <haschu0103@outlook.de> | 2025-02-06 16:28:39 +0100 |
|---|---|---|
| committer | Hannes Schulze <haschu0103@outlook.de> | 2025-02-06 16:28:39 +0100 |
| commit | 30b4364c772114303d9045677186a53855ea5343 (patch) | |
| tree | 3ac3443cdea7274e688bc633fa12bf1e089d6624 /lib/nes/app/ui/screen-confirm-quit.hh | |
| parent | 64308c9e520dbd8e72b675d0ba064ecdaf9bd494 (diff) | |
implement in-game popups
Diffstat (limited to 'lib/nes/app/ui/screen-confirm-quit.hh')
| -rw-r--r-- | lib/nes/app/ui/screen-confirm-quit.hh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/nes/app/ui/screen-confirm-quit.hh b/lib/nes/app/ui/screen-confirm-quit.hh new file mode 100644 index 0000000..c176f4b --- /dev/null +++ b/lib/nes/app/ui/screen-confirm-quit.hh @@ -0,0 +1,24 @@ +#pragma once + +#include "nes/app/ui/screen.hh" + +namespace nes::app +{ + class input_device_keyboard; + + /// A popup asking the user if they really want to quit the game. + class screen_confirm_quit final : public screen + { + input_device_keyboard& keyboard_; + bool confirm_{ false }; + + public: + explicit screen_confirm_quit(input_device_keyboard&); + + auto get_confirm() const -> bool { return confirm_; } + auto set_confirm(bool const v) -> void { confirm_ = v; } + + auto render(renderer&) -> void override; + auto process_events() -> action override; + }; +} // namespace nes::app
\ No newline at end of file |
