1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-19 17:09:40 +00:00

Made sure text edit widget gets focus when dialog is reopened.

This commit is contained in:
Jan Borsodi 2010-09-15 19:48:37 +02:00
parent 84acab03ec
commit 8770e4bc92
3 changed files with 9 additions and 1 deletions

View file

@ -47,6 +47,13 @@ void TextInputDialog::setTextLabel(const std::string &label)
setText("LabelT", label);
}
void TextInputDialog::open()
{
// Make sure the edit box has focus
MyGUI::InputManager::getInstance().setKeyFocusWidget(textEdit);
setVisible(true);
}
// widget controls
void TextInputDialog::onOkClicked(MyGUI::Widget* _sender)

View file

@ -25,6 +25,7 @@ namespace MWGui
void setNextButtonShow(bool shown);
void setTextLabel(const std::string &label);
void open();
// Events
typedef delegates::CDelegate0 EventHandle_Void;

View file

@ -107,7 +107,7 @@ void WindowManager::updateVisible()
nameDialog->setTextLabel(sName);
nameDialog->setNextButtonShow(nameChosen);
nameDialog->eventDone = MyGUI::newDelegate(this, &WindowManager::onNameDialogDone);
nameDialog->setVisible(true);
nameDialog->open();
return;
}