1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Rename height to scale for openConsole() (#5139)

For Game::openConsole() and GUIChatConsole::openConsole() the
parameter name 'height' is misleading because it's actually a
percentage of the screen/window height.
This commit is contained in:
Zeno- 2017-01-29 19:26:00 +10:00 committed by GitHub
parent 3eecc6ff44
commit 707e27b5c2
3 changed files with 11 additions and 7 deletions

View file

@ -1372,7 +1372,7 @@ protected:
void dropSelectedItem();
void openInventory();
void openConsole(float height, const wchar_t *line=NULL);
void openConsole(float scale, const wchar_t *line=NULL);
void toggleFreeMove(float *statustext_time);
void toggleFreeMoveAlt(float *statustext_time, float *jump_timer);
void toggleFast(float *statustext_time);
@ -2779,15 +2779,17 @@ void Game::openInventory()
}
void Game::openConsole(float height, const wchar_t *line)
void Game::openConsole(float scale, const wchar_t *line)
{
assert(scale > 0.0f && scale <= 1.0f);
#ifdef __ANDROID__
porting::showInputDialog(gettext("ok"), "", "", 2);
m_android_chat_open = true;
#else
if (gui_chat_console->isOpenInhibited())
return;
gui_chat_console->openConsole(height);
gui_chat_console->openConsole(scale);
if (line) {
gui_chat_console->setCloseOnEnter(true);
gui_chat_console->replaceAndAddToHistory(line);