mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-21 08:09:39 +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);
|
setText("LabelT", label);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TextInputDialog::open()
|
||||||
|
{
|
||||||
|
// Make sure the edit box has focus
|
||||||
|
MyGUI::InputManager::getInstance().setKeyFocusWidget(textEdit);
|
||||||
|
setVisible(true);
|
||||||
|
}
|
||||||
|
|
||||||
// widget controls
|
// widget controls
|
||||||
|
|
||||||
void TextInputDialog::onOkClicked(MyGUI::Widget* _sender)
|
void TextInputDialog::onOkClicked(MyGUI::Widget* _sender)
|
||||||
|
|
|
@ -25,6 +25,7 @@ namespace MWGui
|
||||||
|
|
||||||
void setNextButtonShow(bool shown);
|
void setNextButtonShow(bool shown);
|
||||||
void setTextLabel(const std::string &label);
|
void setTextLabel(const std::string &label);
|
||||||
|
void open();
|
||||||
|
|
||||||
// Events
|
// Events
|
||||||
typedef delegates::CDelegate0 EventHandle_Void;
|
typedef delegates::CDelegate0 EventHandle_Void;
|
||||||
|
|
|
@ -107,7 +107,7 @@ void WindowManager::updateVisible()
|
||||||
nameDialog->setTextLabel(sName);
|
nameDialog->setTextLabel(sName);
|
||||||
nameDialog->setNextButtonShow(nameChosen);
|
nameDialog->setNextButtonShow(nameChosen);
|
||||||
nameDialog->eventDone = MyGUI::newDelegate(this, &WindowManager::onNameDialogDone);
|
nameDialog->eventDone = MyGUI::newDelegate(this, &WindowManager::onNameDialogDone);
|
||||||
nameDialog->setVisible(true);
|
nameDialog->open();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue