summaryrefslogtreecommitdiff
path: root/src/client/gameui.h
diff options
context:
space:
mode:
authorANAND <ClobberXD@gmail.com>2019-08-07 22:45:33 +0530
committerSmallJoker <SmallJoker@users.noreply.github.com>2019-08-07 19:15:33 +0200
commitfa6bc699bce5e04b134a990cd6f4e1406f95022e (patch)
tree7c9d909fc53ef2f3c2be6ea9edee1bd53fb34331 /src/client/gameui.h
parent1cef09ff10515ae56884e766ddb4b27ef44a9572 (diff)
downloadminetest-fa6bc699bce5e04b134a990cd6f4e1406f95022e.tar.gz
minetest-fa6bc699bce5e04b134a990cd6f4e1406f95022e.tar.bz2
minetest-fa6bc699bce5e04b134a990cd6f4e1406f95022e.zip
Hide chat when console is open (#8656)
Diffstat (limited to 'src/client/gameui.h')
-rw-r--r--src/client/gameui.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/client/gameui.h b/src/client/gameui.h
index 8d20870d7..67c6a9921 100644
--- a/src/client/gameui.h
+++ b/src/client/gameui.h
@@ -28,6 +28,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
using namespace irr;
class Client;
+class GUIChatConsole;
struct MapDrawControl;
/*
@@ -63,7 +64,7 @@ public:
void init();
void update(const RunStats &stats, Client *client, MapDrawControl *draw_control,
const CameraOrientation &cam, const PointedThing &pointed_old,
- float dtime);
+ const GUIChatConsole *chat_console, float dtime);
void initFlags();
const Flags &getFlags() const { return m_flags; }
@@ -81,6 +82,10 @@ public:
void showTranslatedStatusText(const char *str);
inline void clearStatusText() { m_statustext.clear(); }
+ const bool isChatVisible()
+ {
+ return m_flags.show_chat && m_recent_chat_count != 0 && m_profiler_current_page == 0;
+ }
void setChatText(const EnrichedString &chat_text, u32 recent_chat_count);
void updateProfiler();
@@ -114,6 +119,7 @@ private:
video::SColor m_statustext_initial_color;
gui::IGUIStaticText *m_guitext_chat = nullptr; // Chat text
+ u32 m_recent_chat_count = 0;
gui::IGUIStaticText *m_guitext_profiler = nullptr; // Profiler text
u8 m_profiler_current_page = 0;