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 3/X): Move Game::guitext2, Game::guitext_info, Game::infotext to GameUI class

Other enhancements:
* Drop unused GameRunData::time_of_day
* Little GameUI::update code path optimizations
This commit is contained in:
Loic Blot 2018-01-04 19:52:40 +01:00 committed by Loïc Blot
parent 3a772e7ed6
commit aab3b18e4b
5 changed files with 92 additions and 93 deletions

View file

@ -21,6 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#pragma once
#include <IGUIEnvironment.h>
#include <util/pointedthing.h>
#include "game.h"
using namespace irr;
@ -49,20 +50,25 @@ public:
};
void init();
void update(const RunStats &stats, Client *client, const MapDrawControl *draw_control);
void update(const RunStats &stats, Client *client, MapDrawControl *draw_control,
const CameraOrientation &cam, const PointedThing &pointed_old);
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(); }
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
std::wstring m_infotext;
// @TODO future move
// 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;
// gui::IGUIStaticText *m_guitext_chat; // Chat text
// gui::IGUIStaticText *m_guitext_profiler; // Profiler text