Merge branch 'master' into jgrpp

# Conflicts:
#	src/console_gui.cpp
#	src/lang/korean.txt
#	src/video/sdl2_v.cpp
#	src/video/sdl2_v.h
#	src/window.cpp
#	src/window_gui.h
This commit is contained in:
Jonathan G Rennison
2019-11-12 18:43:10 +00:00
1409 changed files with 225 additions and 2908 deletions

View File

@@ -1,5 +1,3 @@
/* $Id$ */
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
@@ -464,11 +462,6 @@ Point GetFocusedWindowTopLeft()
return { _focused_window->left, _focused_window->top };
}
bool FocusedWindowIsConsole()
{
return _focused_window && _focused_window->window_class == WC_CONSOLE;
}
/**
* Check if an edit box is in global focus. That is if focused window
* has a edit box as focused widget, or if a console is focused.
@@ -484,6 +477,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.
*/