diff options
author | yexo <yexo@openttd.org> | 2011-11-08 15:10:39 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2011-11-08 15:10:39 +0000 |
commit | 80e5d13f25bc2383475f6f15ccabc129d2f4b3a4 (patch) | |
tree | 192ff94dd97369ed1069b02456095710aae839c0 | |
parent | dc1fd2dbe685cb15e53fea2bc5d21e196dc301e4 (diff) | |
download | openttd-80e5d13f25bc2383475f6f15ccabc129d2f4b3a4.tar.xz |
(svn r23132) -Fix: when any keys on te on-screen keyboard were pressed the text cursor disappeared
-rw-r--r-- | src/osk_gui.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/osk_gui.cpp b/src/osk_gui.cpp index cd323b362..001251790 100644 --- a/src/osk_gui.cpp +++ b/src/osk_gui.cpp @@ -157,16 +157,13 @@ struct OskWindow : public Window { this->GetWidget<NWidgetCore>(OSK_WIDGET_SHIFT)->colour = HasBit(_keystate, KEYS_SHIFT) ? COLOUR_WHITE : COLOUR_GREY; this->SetDirty(); } + /* Return focus to the parent widget and window. */ + this->parent->SetFocusedWidget(this->text_btn); + SetFocusedWindow(this->parent); return; } switch (widget) { - case OSK_WIDGET_TEXT: - /* Return focus to the parent widget and window. */ - this->parent->SetFocusedWidget(this->text_btn); - SetFocusedWindow(this->parent); - break; - case OSK_WIDGET_BACKSPACE: if (DeleteTextBufferChar(&this->qs->text, WKC_BACKSPACE)) this->InvalidateParent(); break; @@ -229,6 +226,9 @@ struct OskWindow : public Window { } break; } + /* Return focus to the parent widget and window. */ + this->parent->SetFocusedWidget(this->text_btn); + SetFocusedWindow(this->parent); } void InvalidateParent() |