diff options
author | Loic Blot <loic.blot@unix-experience.fr> | 2018-01-04 23:04:40 +0100 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2018-01-05 20:59:30 +0100 |
commit | 326b0faa5e0bee62ee3100f345c021cee020f2dd (patch) | |
tree | d3a4875e98e0698184297b3d1231857a68363c72 /src/client/gameui.h | |
parent | fe510d90c15d9bec3a8c1dafc7b1730b11a9f6bd (diff) | |
download | minetest-326b0faa5e0bee62ee3100f345c021cee020f2dd.tar.gz minetest-326b0faa5e0bee62ee3100f345c021cee020f2dd.tar.bz2 minetest-326b0faa5e0bee62ee3100f345c021cee020f2dd.zip |
GameUI refactor (part 5/X): Move Game::guitext_chat to GameUI class
Other enhancements:
* Move update_profiler_gui to Game class
* Move updateChat to Game class
Diffstat (limited to 'src/client/gameui.h')
-rw-r--r-- | src/client/gameui.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/client/gameui.h b/src/client/gameui.h index fc2b8707e..d1838f628 100644 --- a/src/client/gameui.h +++ b/src/client/gameui.h @@ -21,7 +21,8 @@ with this program; if not, write to the Free Software Foundation, Inc., #pragma once #include <IGUIEnvironment.h> -#include <util/pointedthing.h> +#include "util/enriched_string.h" +#include "util/pointedthing.h" #include "game.h" using namespace irr; @@ -54,7 +55,8 @@ public: void init(); void update(const RunStats &stats, Client *client, MapDrawControl *draw_control, - const CameraOrientation &cam, const PointedThing &pointed_old, float dtime); + const CameraOrientation &cam, const PointedThing &pointed_old, + float dtime); void initFlags(); const Flags &getFlags() const { return m_flags; } @@ -71,20 +73,24 @@ public: } inline void clearStatusText() { m_statustext.clear(); } + void setChatText(const EnrichedString &chat_text, u32 recent_chat_count, + u32 profiler_current_page); + private: Flags m_flags; - gui::IGUIStaticText *m_guitext = nullptr; // First line of debug text - gui::IGUIStaticText *m_guitext2 = nullptr; // Second line of debug text + 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 + 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; + gui::IGUIStaticText *m_guitext_chat; // Chat text + // @TODO future move - // gui::IGUIStaticText *m_guitext_chat; // Chat text // gui::IGUIStaticText *m_guitext_profiler; // Profiler text }; |