Changeset - r9399:b351385f4246
[Not reviewed]
master
0 2 0
smatz - 16 years ago 2008-05-28 15:28:27
smatz@openttd.org
(svn r13310) -Fix: invalidate OSK when parent editbox changes (from keyboard)
2 files changed with 10 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/misc_gui.cpp
Show inline comments
 
@@ -1083,6 +1083,11 @@ struct QueryStringWindow : public QueryS
 
	{
 
		EventState state;
 
		switch (this->HandleEditBoxKey(QUERY_STR_WIDGET_TEXT, key, keycode, state)) {
 
			default: NOT_REACHED();
 
			case 0: {
 
				Window *osk = FindWindowById(WC_OSK, 0);
 
				if (osk != NULL && osk->parent == this) osk->OnInvalidateData();
 
			} break;
 
			case 1: this->OnOk(); // Enter pressed, confirms change
 
			/* FALL THROUGH */
 
			case 2: delete this; break; // ESC pressed, closes window, abandons changes
src/osk_gui.cpp
Show inline comments
 
@@ -203,6 +203,11 @@ struct OskWindow : public Window {
 
		/* make the caret of the parent window also blink */
 
		this->parent->InvalidateWidget(this->text_btn);
 
	}
 

	
 
	virtual void OnInvalidateData(int)
 
	{
 
		this->InvalidateWidget(OSK_WIDGET_TEXT);
 
	}
 
};
 

	
 
static const Widget _osk_widgets[] = {
0 comments (0 inline, 0 general)