summaryrefslogtreecommitdiff
path: root/src/client/gameui.h
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2018-01-03 17:28:57 +0100
committerLoïc Blot <nerzhul@users.noreply.github.com>2018-01-05 20:59:30 +0100
commit3a772e7ed6c02f91de57320b1694c7d11e1c7618 (patch)
tree8662cc6a9ac690713d74abdf01406b30c86c8e3b /src/client/gameui.h
parent0ebaed430ad5cd2523d78d2e2c051576e948fe13 (diff)
downloadminetest-3a772e7ed6c02f91de57320b1694c7d11e1c7618.tar.gz
minetest-3a772e7ed6c02f91de57320b1694c7d11e1c7618.tar.bz2
minetest-3a772e7ed6c02f91de57320b1694c7d11e1c7618.zip
GameUI refactor (part 2/X): Move Game::guitext to GameUI + enhancements on StaticText
Other enhancements: * C++ friendlyness for addStaticText() -> move to static StaticText::add()
Diffstat (limited to 'src/client/gameui.h')
-rw-r--r--src/client/gameui.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/client/gameui.h b/src/client/gameui.h
index bd9c0f626..593fd4ff3 100644
--- a/src/client/gameui.h
+++ b/src/client/gameui.h
@@ -20,9 +20,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#pragma once
-#include "IGUIEnvironment.h"
+#include <IGUIEnvironment.h>
+#include "game.h"
using namespace irr;
+class Client;
+struct MapDrawControl;
class GameUI
{
@@ -30,6 +33,9 @@ class GameUI
friend class Game;
public:
+ GameUI() = default;
+ ~GameUI() = default;
+
// Flags that can, or may, change during main game loop
struct Flags
{
@@ -42,16 +48,19 @@ public:
bool disable_camera_update;
};
+ void init();
+ void update(const RunStats &stats, Client *client, const MapDrawControl *draw_control);
+
void initFlags();
const Flags &getFlags() const { return m_flags; }
- void showMinimap(const bool show);
+ void showMinimap(bool show);
private:
Flags m_flags;
+ gui::IGUIStaticText *m_guitext; // First line of debug text
// @TODO future move
- // 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_status;