mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-01 07:45:33 +00:00
fix character preview destruction; don't allow empty names in name dialog
This commit is contained in:
parent
747a4e1123
commit
4d4ba6698a
2 changed files with 16 additions and 2 deletions
|
@ -47,10 +47,22 @@ void TextInputDialog::open()
|
|||
|
||||
void TextInputDialog::onOkClicked(MyGUI::Widget* _sender)
|
||||
{
|
||||
if (mTextEdit->getCaption() == "")
|
||||
{
|
||||
mWindowManager.messageBox ("#{sNotifyMessage37}", std::vector<std::string>());
|
||||
MyGUI::InputManager::getInstance ().setKeyFocusWidget (mTextEdit);
|
||||
}
|
||||
else
|
||||
eventDone(this);
|
||||
}
|
||||
|
||||
void TextInputDialog::onTextAccepted(MyGUI::Edit* _sender)
|
||||
{
|
||||
if (mTextEdit->getCaption() == "")
|
||||
{
|
||||
mWindowManager.messageBox ("#{sNotifyMessage37}", std::vector<std::string>());
|
||||
MyGUI::InputManager::getInstance ().setKeyFocusWidget (mTextEdit);
|
||||
}
|
||||
else
|
||||
eventDone(this);
|
||||
}
|
||||
|
|
|
@ -72,6 +72,8 @@ namespace MWRender
|
|||
CharacterPreview::~CharacterPreview ()
|
||||
{
|
||||
Ogre::TextureManager::getSingleton().remove(mName);
|
||||
mSceneMgr->destroyCamera (mName);
|
||||
delete mAnimation;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue