File tree 3 files changed +12
-0
lines changed
3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1684,6 +1684,10 @@ void the_game(
1684
1684
{
1685
1685
input->clear ();
1686
1686
}
1687
+ if (!guienv->hasFocus (gui_chat_console) && gui_chat_console->isOpen ())
1688
+ {
1689
+ gui_chat_console->closeConsoleAtOnce ();
1690
+ }
1687
1691
1688
1692
// Input handler step() (used by the random input generator)
1689
1693
input->step (dtime);
Original file line number Diff line number Diff line change @@ -134,6 +134,11 @@ void GUIChatConsole::openConsole(f32 height)
134
134
reformatConsole ();
135
135
}
136
136
137
+ bool GUIChatConsole::isOpen () const
138
+ {
139
+ return m_open;
140
+ }
141
+
137
142
bool GUIChatConsole::isOpenInhibited () const
138
143
{
139
144
return m_open_inhibited > 0 ;
Original file line number Diff line number Diff line change @@ -39,6 +39,9 @@ class GUIChatConsole : public gui::IGUIElement
39
39
// This doesn't open immediately but initiates an animation.
40
40
// You should call isOpenInhibited() before this.
41
41
void openConsole (f32 height);
42
+
43
+ bool isOpen () const ;
44
+
42
45
// Check if the console should not be opened at the moment
43
46
// This is to avoid reopening the console immediately after closing
44
47
bool isOpenInhibited () const ;
You can’t perform that action at this time.
0 commit comments