Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/frontend/StarErrorScreen.hpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-06-20 14:33:09 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-06-20 14:33:09 +1000
commit6352e8e3196f78388b6c771073f9e03eaa612673 (patch)
treee23772f79a7fbc41bc9108951e9e136857484bf4 /source/frontend/StarErrorScreen.hpp
parent6741a057e5639280d85d0f88ba26f000baa58f61 (diff)
everything everywhere
all at once
Diffstat (limited to 'source/frontend/StarErrorScreen.hpp')
-rw-r--r--source/frontend/StarErrorScreen.hpp51
1 files changed, 51 insertions, 0 deletions
diff --git a/source/frontend/StarErrorScreen.hpp b/source/frontend/StarErrorScreen.hpp
new file mode 100644
index 0000000..b289678
--- /dev/null
+++ b/source/frontend/StarErrorScreen.hpp
@@ -0,0 +1,51 @@
+#ifndef STAR_ERROR_SCREEN_HPP
+#define STAR_ERROR_SCREEN_HPP
+
+#include "StarVector.hpp"
+#include "StarString.hpp"
+#include "StarInterfaceCursor.hpp"
+#include "StarInputEvent.hpp"
+
+namespace Star {
+
+STAR_CLASS(Pane);
+STAR_CLASS(PaneManager);
+STAR_CLASS(GuiContext);
+
+STAR_CLASS(ErrorScreen);
+
+class ErrorScreen {
+public:
+ ErrorScreen();
+
+ // Resets accepted
+ void setMessage(String const& message);
+
+ bool accepted();
+
+ void render();
+
+ bool handleInputEvent(InputEvent const& event);
+ void update();
+
+private:
+ void renderCursor();
+
+ void back();
+
+ float interfaceScale() const;
+ unsigned windowHeight() const;
+ unsigned windowWidth() const;
+
+ GuiContext* m_guiContext;
+ PaneManagerPtr m_paneManager;
+ PanePtr m_errorPane;
+
+ bool m_accepted;
+ Vec2I m_cursorScreenPos;
+ InterfaceCursor m_cursor;
+};
+
+}
+
+#endif