(svn r15424) -Codechange: make it possible to have multiple windows with edit box open simultaniously (Zuu).

This commit is contained in:
rubidium
2009-02-09 01:22:29 +00:00
parent 66cb1fe1ff
commit 5080feba0d
13 changed files with 232 additions and 55 deletions

View File

@@ -131,6 +131,21 @@ struct OskWindow : public Window {
}
switch (widget) {
case OSK_WIDGET_TEXT:
/* Find the edit box of the parent window and give focus to that */
for (uint i = 0; i < this->parent->widget_count; i++) {
Widget &wi = this->parent->widget[i];
if (wi.type == WWT_EDITBOX) {
this->parent->focused_widget = &wi;
break;
}
}
/* Give focus to parent window */
SetFocusedWindow(this->parent);
break;
case OSK_WIDGET_BACKSPACE:
if (DeleteTextBufferChar(&this->qs->text, WKC_BACKSPACE)) this->InvalidateParent();
break;