|
|
@ -23,9 +23,9 @@ void WindowBase::setVisible(bool visible)
|
|
|
|
mMainWidget->setVisible(visible);
|
|
|
|
mMainWidget->setVisible(visible);
|
|
|
|
|
|
|
|
|
|
|
|
if (visible)
|
|
|
|
if (visible)
|
|
|
|
open();
|
|
|
|
onOpen();
|
|
|
|
else if (wasVisible && !visible)
|
|
|
|
else if (wasVisible && !visible)
|
|
|
|
close();
|
|
|
|
onClose();
|
|
|
|
|
|
|
|
|
|
|
|
// This is needed as invisible widgets can retain key focus.
|
|
|
|
// This is needed as invisible widgets can retain key focus.
|
|
|
|
// Remove for MyGUI 3.2.2
|
|
|
|
// Remove for MyGUI 3.2.2
|
|
|
@ -64,13 +64,13 @@ WindowModal::WindowModal(const std::string& parLayout)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void WindowModal::open()
|
|
|
|
void WindowModal::onOpen()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
MyGUI::InputManager::getInstance ().addWidgetModal (mMainWidget);
|
|
|
|
MyGUI::InputManager::getInstance ().addWidgetModal (mMainWidget);
|
|
|
|
MWBase::Environment::get().getWindowManager()->addCurrentModal(this); //Set so we can escape it if needed
|
|
|
|
MWBase::Environment::get().getWindowManager()->addCurrentModal(this); //Set so we can escape it if needed
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void WindowModal::close()
|
|
|
|
void WindowModal::onClose()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
MyGUI::InputManager::getInstance ().removeWidgetModal (mMainWidget);
|
|
|
|
MyGUI::InputManager::getInstance ().removeWidgetModal (mMainWidget);
|
|
|
|
MWBase::Environment::get().getWindowManager()->removeCurrentModal(this);
|
|
|
|
MWBase::Environment::get().getWindowManager()->removeCurrentModal(this);
|
|
|
|