1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-06 17:41:04 +00:00

GameUI refactor (part 2/X): Move Game::guitext to GameUI + enhancements on StaticText

Other enhancements:
* C++ friendlyness for addStaticText() -> move to static StaticText::add()
This commit is contained in:
Loic Blot 2018-01-03 17:28:57 +01:00 committed by Loïc Blot
parent 0ebaed430a
commit 3a772e7ed6
8 changed files with 159 additions and 134 deletions

View file

@ -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;