mirror of https://github.com/OpenTTD/OpenTTD
(svn r23132) -Fix: when any keys on te on-screen keyboard were pressed the text cursor disappeared
parent
dc1fd2dbe6
commit
80e5d13f25
|
@ -157,16 +157,13 @@ struct OskWindow : public Window {
|
||||||
this->GetWidget<NWidgetCore>(OSK_WIDGET_SHIFT)->colour = HasBit(_keystate, KEYS_SHIFT) ? COLOUR_WHITE : COLOUR_GREY;
|
this->GetWidget<NWidgetCore>(OSK_WIDGET_SHIFT)->colour = HasBit(_keystate, KEYS_SHIFT) ? COLOUR_WHITE : COLOUR_GREY;
|
||||||
this->SetDirty();
|
this->SetDirty();
|
||||||
}
|
}
|
||||||
|
/* Return focus to the parent widget and window. */
|
||||||
|
this->parent->SetFocusedWidget(this->text_btn);
|
||||||
|
SetFocusedWindow(this->parent);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (widget) {
|
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:
|
case OSK_WIDGET_BACKSPACE:
|
||||||
if (DeleteTextBufferChar(&this->qs->text, WKC_BACKSPACE)) this->InvalidateParent();
|
if (DeleteTextBufferChar(&this->qs->text, WKC_BACKSPACE)) this->InvalidateParent();
|
||||||
break;
|
break;
|
||||||
|
@ -229,6 +226,9 @@ struct OskWindow : public Window {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
/* Return focus to the parent widget and window. */
|
||||||
|
this->parent->SetFocusedWidget(this->text_btn);
|
||||||
|
SetFocusedWindow(this->parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InvalidateParent()
|
void InvalidateParent()
|
||||||
|
|
Loading…
Reference in New Issue