Changeset - r18286:00557086f2ac
[Not reviewed]
master
0 1 0
yexo - 13 years ago 2011-11-08 15:10:39
yexo@openttd.org
(svn r23132) -Fix: when any keys on te on-screen keyboard were pressed the text cursor disappeared
1 file changed with 6 insertions and 6 deletions:
0 comments (0 inline, 0 general)
src/osk_gui.cpp
Show inline comments
 
@@ -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()
0 comments (0 inline, 0 general)