From 6352e8e3196f78388b6c771073f9e03eaa612673 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Tue, 20 Jun 2023 14:33:09 +1000 Subject: everything everywhere all at once --- source/frontend/StarErrorScreen.hpp | 51 +++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 source/frontend/StarErrorScreen.hpp (limited to 'source/frontend/StarErrorScreen.hpp') 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 -- cgit v1.2.3