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-error.hh | |
| parent | 64308c9e520dbd8e72b675d0ba064ecdaf9bd494 (diff) | |
implement in-game popups
Diffstat (limited to 'lib/nes/app/ui/screen-error.hh')
| -rw-r--r-- | lib/nes/app/ui/screen-error.hh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/nes/app/ui/screen-error.hh b/lib/nes/app/ui/screen-error.hh index ec877e1..4559942 100644 --- a/lib/nes/app/ui/screen-error.hh +++ b/lib/nes/app/ui/screen-error.hh @@ -12,14 +12,17 @@ namespace nes::app input_device_keyboard& keyboard_; std::string_view message_; status error_{ status::success }; + action action_{}; public: explicit screen_error(input_device_keyboard&); auto get_message() const -> std::string_view { return message_; } auto get_error() const -> status { return error_; } - auto set_message(std::string_view const v) { message_ = v; } - auto set_error(status const v) { error_ = v; } + auto get_action() const -> action { return action_; } + auto set_message(std::string_view const v) -> void { message_ = v; } + auto set_error(status const v) -> void { error_ = v; } + auto set_action(action const& v) -> void { action_ = v; } auto render(renderer&) -> void override; auto process_events() -> action override; |
