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:
parent
84acab03ec
commit
8770e4bc92
3 changed files with 9 additions and 1 deletions
|
@ -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)
|
||||
|
|
|
@ -25,6 +25,7 @@ namespace MWGui
|
|||
|
||||
void setNextButtonShow(bool shown);
|
||||
void setTextLabel(const std::string &label);
|
||||
void open();
|
||||
|
||||
// Events
|
||||
typedef delegates::CDelegate0 EventHandle_Void;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue