aboutsummaryrefslogtreecommitdiff
path: root/src/client/gameui.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/gameui.h')
-rw-r--r--src/client/gameui.h29
1 files changed, 22 insertions, 7 deletions
diff --git a/src/client/gameui.h b/src/client/gameui.h
index 0e1085b01..fc2b8707e 100644
--- a/src/client/gameui.h
+++ b/src/client/gameui.h
@@ -33,6 +33,9 @@ class GameUI
// Temporary between coding time to move things here
friend class Game;
+ // Permit unittests to access members directly
+ friend class TestGameUI;
+
public:
GameUI() = default;
~GameUI() = default;
@@ -51,25 +54,37 @@ public:
void init();
void update(const RunStats &stats, Client *client, MapDrawControl *draw_control,
- const CameraOrientation &cam, const PointedThing &pointed_old);
+ const CameraOrientation &cam, const PointedThing &pointed_old, float dtime);
void initFlags();
const Flags &getFlags() const { return m_flags; }
void showMinimap(bool show);
- void setInfoText(const std::wstring &str) { m_infotext = str; }
- void clearInfoText() { m_infotext.clear(); }
+ inline void setInfoText(const std::wstring &str) { m_infotext = str; }
+ inline void clearInfoText() { m_infotext.clear(); }
+
+ inline void showStatusText(const std::wstring &str)
+ {
+ m_statustext = str;
+ m_statustext_time = 0.0f;
+ }
+ inline void clearStatusText() { m_statustext.clear(); }
private:
Flags m_flags;
- gui::IGUIStaticText *m_guitext; // First line of debug text
- gui::IGUIStaticText *m_guitext2; // Second line of debug text
- gui::IGUIStaticText *m_guitext_info; // At the middle of the screen
+ gui::IGUIStaticText *m_guitext = nullptr; // First line of debug text
+ gui::IGUIStaticText *m_guitext2 = nullptr; // Second line of debug text
+
+ gui::IGUIStaticText *m_guitext_info = nullptr; // At the middle of the screen
std::wstring m_infotext;
+
+ gui::IGUIStaticText *m_guitext_status = nullptr;
+ std::wstring m_statustext;
+ float m_statustext_time = 0.0f;
+
// @TODO future move
- // gui::IGUIStaticText *m_guitext_status;
// gui::IGUIStaticText *m_guitext_chat; // Chat text
// gui::IGUIStaticText *m_guitext_profiler; // Profiler text
};