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

Hide chat when console is open (#8656)

This commit is contained in:
ANAND 2019-08-07 22:45:33 +05:30 committed by SmallJoker
parent 1cef09ff10
commit fa6bc699bc
3 changed files with 15 additions and 6 deletions

View file

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