2024-02-25 14:46:47 +00:00
|
|
|
#pragma once
|
2023-06-20 04:33:09 +00:00
|
|
|
|
|
|
|
#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();
|
|
|
|
|
2023-06-26 10:40:32 +00:00
|
|
|
void render(bool useBackdrop = false);
|
2023-06-20 04:33:09 +00:00
|
|
|
|
|
|
|
bool handleInputEvent(InputEvent const& event);
|
2023-07-20 14:58:49 +00:00
|
|
|
void update(float dt);
|
2023-06-20 04:33:09 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
void renderCursor();
|
|
|
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|