diff options
author | rubidium <rubidium@openttd.org> | 2009-01-03 13:59:05 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-01-03 13:59:05 +0000 |
commit | 72d89337eea73156b6667874444919695f1cca28 (patch) | |
tree | f69467d5bbbf0587e6289219150ab4a8313edf8c /src/misc_gui.cpp | |
parent | f31679662908a38f09415e319a8855e314f32d37 (diff) | |
download | openttd-72d89337eea73156b6667874444919695f1cca28.tar.xz |
(svn r14804) -Codechange: unify opening the OSK (Zuu)
Diffstat (limited to 'src/misc_gui.cpp')
-rw-r--r-- | src/misc_gui.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index b38fcc6d3..2fa1ee449 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -1061,6 +1061,11 @@ void QueryStringBaseWindow::DrawEditBox(int wid) this->QueryString::DrawEditBox(this, wid); } +void QueryStringBaseWindow::OnOpenOSKWindow(int wid) +{ + ShowOnScreenKeyboard(this, wid, 0, 0); +} + enum QueryStringWidgets { QUERY_STR_WIDGET_TEXT = 3, QUERY_STR_WIDGET_DEFAULT, @@ -1103,10 +1108,6 @@ struct QueryStringWindow : public QueryStringBaseWindow virtual void OnClick(Point pt, int widget) { switch (widget) { - case QUERY_STR_WIDGET_TEXT: - ShowOnScreenKeyboard(this, QUERY_STR_WIDGET_TEXT, QUERY_STR_WIDGET_CANCEL, QUERY_STR_WIDGET_OK); - break; - case QUERY_STR_WIDGET_DEFAULT: this->text.buf[0] = '\0'; /* Fallthrough */ @@ -1140,6 +1141,11 @@ struct QueryStringWindow : public QueryStringBaseWindow return state; } + virtual void OnOpenOSKWindow(int wid) + { + ShowOnScreenKeyboard(this, wid, QUERY_STR_WIDGET_CANCEL, QUERY_STR_WIDGET_OK); + } + ~QueryStringWindow() { if (!this->handled && this->parent != NULL) { @@ -1594,10 +1600,6 @@ struct SaveLoadWindow : public QueryStringBaseWindow { break; } - case 10: // edit box - ShowOnScreenKeyboard(this, widget, 0, 0); - break; - case 11: case 12: // Delete, Save game break; } |