aboutsummaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorZeno- <kde.psych@gmail.com>2017-01-29 19:26:00 +1000
committerGitHub <noreply@github.com>2017-01-29 19:26:00 +1000
commit707e27b5c26b6c082abbd2f385a976c5bc8964fe (patch)
tree6d3e84e178221bda1c03fe402f9fa08b20a773a8 /src/game.cpp
parent3eecc6ff4492ca21772544451fd8aa78871bac3b (diff)
downloaddragonfireclient-707e27b5c26b6c082abbd2f385a976c5bc8964fe.tar.xz
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.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 07d429c6b..4b4597a7a 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -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);