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.cc | |
| parent | 64308c9e520dbd8e72b675d0ba064ecdaf9bd494 (diff) | |
implement in-game popups
Diffstat (limited to 'lib/nes/app/ui/screen-error.cc')
| -rw-r--r-- | lib/nes/app/ui/screen-error.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/nes/app/ui/screen-error.cc b/lib/nes/app/ui/screen-error.cc index 67a3244..9375012 100644 --- a/lib/nes/app/ui/screen-error.cc +++ b/lib/nes/app/ui/screen-error.cc @@ -12,8 +12,8 @@ namespace nes::app auto screen_error::render(renderer& renderer) -> void { - // TODO: Nicer box - renderer.render_rect(2, 9, 28, 5, color::background_secondary); + renderer.render_rect(2, 8, 28, 10, color::background_secondary); + renderer.render_border(2, 8, 28, 10, color::foreground_primary); auto const attrs = text_attributes{} .set_alignment(text_alignment::center) @@ -21,6 +21,7 @@ namespace nes::app .set_max_width(26); renderer.render_text_format(16, 10, color::foreground_primary, attrs, "{}:", message_); renderer.render_text(16, 12, to_string(error_), color::foreground_primary, attrs); + renderer.render_text(16, 15, "> OK <", color::accent_primary, attrs); } auto screen_error::process_events() -> action @@ -29,7 +30,7 @@ namespace nes::app { if (event == input_event::key_down(key::enter)) { - return action::close_popup(); + return action_; } } |
