Codechange: Add utility function for whether the focused window is a console
This commit is contained in:

committed by
Charles Pigott

parent
81f159434d
commit
1dba06656d
@@ -466,6 +466,15 @@ bool EditBoxInGlobalFocus()
|
||||
return _focused_window->nested_focus != nullptr && _focused_window->nested_focus->type == WWT_EDITBOX;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a console is focused.
|
||||
* @return returns true if the focused window is a console, else false
|
||||
*/
|
||||
bool FocusedWindowIsConsole()
|
||||
{
|
||||
return _focused_window && _focused_window->window_class == WC_CONSOLE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes no widget on this window have focus. The function however doesn't change which window has focus.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user