diff options
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 |
