fix character preview destruction; don't allow empty names in name dialog

actorid
scrawl 12 years ago
parent 747a4e1123
commit 4d4ba6698a

@ -47,10 +47,22 @@ void TextInputDialog::open()
void TextInputDialog::onOkClicked(MyGUI::Widget* _sender)
{
eventDone(this);
if (mTextEdit->getCaption() == "")
{
mWindowManager.messageBox ("#{sNotifyMessage37}", std::vector<std::string>());
MyGUI::InputManager::getInstance ().setKeyFocusWidget (mTextEdit);
}
else
eventDone(this);
}
void TextInputDialog::onTextAccepted(MyGUI::Edit* _sender)
{
eventDone(this);
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…
Cancel
Save