diff options
author | frosch <frosch@openttd.org> | 2012-11-13 21:46:54 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2012-11-13 21:46:54 +0000 |
commit | fd55399167115dbb06e77bb03f85681ba318f5f2 (patch) | |
tree | 98b7ed09e96dbb242e05bd7551e750afb4fc1a6f /src/querystring_gui.h | |
parent | 67f92f16eda1e9d251d665df7ceaa6127af4c593 (diff) | |
download | openttd-fd55399167115dbb06e77bb03f85681ba318f5f2.tar.xz |
(svn r24731) -Codechange: Remove OnOpenOSKWindow and instead specify OK and CANCEL buttons via QueryString members.
Diffstat (limited to 'src/querystring_gui.h')
-rw-r--r-- | src/querystring_gui.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/querystring_gui.h b/src/querystring_gui.h index 5c1156546..554d6ccb2 100644 --- a/src/querystring_gui.h +++ b/src/querystring_gui.h @@ -32,6 +32,8 @@ enum HandleEditBoxResult */ struct QueryString { StringID caption; + int ok_button; ///< Widget button of parent window to simulate when pressing OK in OSK. + int cancel_button; ///< Widget button of parent window to simulate when pressing CANCEL in OSK. Textbuf text; const char *orig; CharSetFilter afilter; @@ -40,7 +42,7 @@ struct QueryString { /** * Make sure everything gets initialized properly. */ - QueryString() : orig(NULL) + QueryString() : ok_button(-1), cancel_button(-1), orig(NULL) { } @@ -79,19 +81,13 @@ struct QueryStringBaseWindow : public Window, public QueryString { HandleEditBoxResult HandleEditBoxKey(int wid, uint16 key, uint16 keycode, EventState &state); /** - * Callback for when the OSK window is opened. - * @param wid The widget the OSK is opened of. - */ - virtual void OnOpenOSKWindow(int wid); - - /** * Callback for when on input has been entered with the OSK. * @param wid The widget the OSK was attached to. */ virtual void OnOSKInput(int wid) {} }; -void ShowOnScreenKeyboard(QueryStringBaseWindow *parent, int button, int cancel, int ok); +void ShowOnScreenKeyboard(QueryStringBaseWindow *parent, int button); void UpdateOSKOriginalText(const QueryStringBaseWindow *parent, int button); #endif /* QUERYSTRING_GUI_H */ |