From 64308c9e520dbd8e72b675d0ba064ecdaf9bd494 Mon Sep 17 00:00:00 2001 From: Hannes Schulze Date: Tue, 4 Feb 2025 23:39:24 +0100 Subject: add error handling to ui --- lib/nes/app/application.hh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/nes/app/application.hh') diff --git a/lib/nes/app/application.hh b/lib/nes/app/application.hh index 724f2b6..81e6516 100644 --- a/lib/nes/app/application.hh +++ b/lib/nes/app/application.hh @@ -3,6 +3,7 @@ #include "nes/app/input/input-manager.hh" #include "nes/app/ui/screen-title.hh" #include "nes/app/ui/screen-browser.hh" +#include "nes/app/ui/screen-error.hh" #include "nes/sys/nes.hh" #include "nes/common/box.hh" #include "nes/common/display.hh" @@ -27,6 +28,7 @@ namespace nes::app { public: display& base; + screen* popup{ nullptr }; screen* screen{ nullptr }; explicit display_proxy(display& base) @@ -45,6 +47,7 @@ namespace nes::app box console_{}; screen_title screen_title_; screen_browser screen_browser_; + screen_error screen_error_; public: explicit application(display&, input_device_keyboard&, file_browser& file_browser); @@ -62,5 +65,6 @@ namespace nes::app private: auto handle_action(action) -> void; + auto show_error(std::string_view message, status error) -> void; }; } // namespace nes::app \ No newline at end of file -- cgit v1.3.1