mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 06:53:53 +00:00
Rename WindowBase's open/close to onOpen/onClose
This commit is contained in:
parent
5482ad0482
commit
01391b7eed
51 changed files with 82 additions and 82 deletions
|
@ -101,7 +101,7 @@ namespace MWGui
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AlchemyWindow::open()
|
void AlchemyWindow::onOpen()
|
||||||
{
|
{
|
||||||
mAlchemy->setAlchemist (MWMechanics::getPlayer());
|
mAlchemy->setAlchemist (MWMechanics::getPlayer());
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ namespace MWGui
|
||||||
public:
|
public:
|
||||||
AlchemyWindow();
|
AlchemyWindow();
|
||||||
|
|
||||||
virtual void open();
|
virtual void onOpen();
|
||||||
virtual void exit();
|
virtual void exit();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -64,9 +64,9 @@ namespace MWGui
|
||||||
okButton->setCaption(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOK", ""));
|
okButton->setCaption(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOK", ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
void BirthDialog::open()
|
void BirthDialog::onOpen()
|
||||||
{
|
{
|
||||||
WindowModal::open();
|
WindowModal::onOpen();
|
||||||
updateBirths();
|
updateBirths();
|
||||||
updateSpells();
|
updateSpells();
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ namespace MWGui
|
||||||
void setBirthId(const std::string &raceId);
|
void setBirthId(const std::string &raceId);
|
||||||
|
|
||||||
void setNextButtonShow(bool shown);
|
void setNextButtonShow(bool shown);
|
||||||
virtual void open();
|
virtual void onOpen();
|
||||||
|
|
||||||
// Events
|
// Events
|
||||||
typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;
|
typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;
|
||||||
|
|
|
@ -125,9 +125,9 @@ namespace MWGui
|
||||||
okButton->setCaption(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOK", ""));
|
okButton->setCaption(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOK", ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PickClassDialog::open()
|
void PickClassDialog::onOpen()
|
||||||
{
|
{
|
||||||
WindowModal::open ();
|
WindowModal::onOpen ();
|
||||||
updateClasses();
|
updateClasses();
|
||||||
updateStats();
|
updateStats();
|
||||||
}
|
}
|
||||||
|
@ -341,9 +341,9 @@ namespace MWGui
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void InfoBoxDialog::open()
|
void InfoBoxDialog::onOpen()
|
||||||
{
|
{
|
||||||
WindowModal::open();
|
WindowModal::onOpen();
|
||||||
// Fix layout
|
// Fix layout
|
||||||
layoutVertically(mTextBox, 4);
|
layoutVertically(mTextBox, 4);
|
||||||
layoutVertically(mButtonBar, 6);
|
layoutVertically(mButtonBar, 6);
|
||||||
|
|
|
@ -21,7 +21,7 @@ namespace MWGui
|
||||||
std::string getText() const;
|
std::string getText() const;
|
||||||
void setButtons(ButtonList &buttons);
|
void setButtons(ButtonList &buttons);
|
||||||
|
|
||||||
virtual void open();
|
virtual void onOpen();
|
||||||
|
|
||||||
// Events
|
// Events
|
||||||
typedef MyGUI::delegates::CMultiDelegate1<int> EventHandle_Int;
|
typedef MyGUI::delegates::CMultiDelegate1<int> EventHandle_Int;
|
||||||
|
@ -100,7 +100,7 @@ namespace MWGui
|
||||||
void setClassId(const std::string &classId);
|
void setClassId(const std::string &classId);
|
||||||
|
|
||||||
void setNextButtonShow(bool shown);
|
void setNextButtonShow(bool shown);
|
||||||
virtual void open();
|
virtual void onOpen();
|
||||||
|
|
||||||
// Events
|
// Events
|
||||||
typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;
|
typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;
|
||||||
|
|
|
@ -145,14 +145,14 @@ namespace MWGui
|
||||||
mCompilerContext.setExtensions (&mExtensions);
|
mCompilerContext.setExtensions (&mExtensions);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Console::open()
|
void Console::onOpen()
|
||||||
{
|
{
|
||||||
// Give keyboard focus to the combo box whenever the console is
|
// Give keyboard focus to the combo box whenever the console is
|
||||||
// turned on
|
// turned on
|
||||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mCommandLine);
|
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mCommandLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Console::close()
|
void Console::onClose()
|
||||||
{
|
{
|
||||||
// Apparently, hidden widgets can retain key focus
|
// Apparently, hidden widgets can retain key focus
|
||||||
// Remove for MyGUI 3.2.2
|
// Remove for MyGUI 3.2.2
|
||||||
|
|
|
@ -39,8 +39,8 @@ namespace MWGui
|
||||||
|
|
||||||
Console(int w, int h, bool consoleOnlyScripts);
|
Console(int w, int h, bool consoleOnlyScripts);
|
||||||
|
|
||||||
virtual void open();
|
virtual void onOpen();
|
||||||
virtual void close();
|
virtual void onClose();
|
||||||
|
|
||||||
virtual void exit();
|
virtual void exit();
|
||||||
|
|
||||||
|
|
|
@ -172,9 +172,9 @@ namespace MWGui
|
||||||
mSortModel = NULL;
|
mSortModel = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ContainerWindow::close()
|
void ContainerWindow::onClose()
|
||||||
{
|
{
|
||||||
WindowBase::close();
|
WindowBase::onClose();
|
||||||
|
|
||||||
if (dynamic_cast<PickpocketItemModel*>(mModel)
|
if (dynamic_cast<PickpocketItemModel*>(mModel)
|
||||||
// Make sure we were actually closed, rather than just temporarily hidden (e.g. console or main menu opened)
|
// Make sure we were actually closed, rather than just temporarily hidden (e.g. console or main menu opened)
|
||||||
|
|
|
@ -34,7 +34,7 @@ namespace MWGui
|
||||||
ContainerWindow(DragAndDrop* dragAndDrop);
|
ContainerWindow(DragAndDrop* dragAndDrop);
|
||||||
|
|
||||||
void openContainer(const MWWorld::Ptr& container, bool loot=false);
|
void openContainer(const MWWorld::Ptr& container, bool loot=false);
|
||||||
virtual void close();
|
virtual void onClose();
|
||||||
|
|
||||||
virtual void resetReference();
|
virtual void resetReference();
|
||||||
|
|
||||||
|
|
|
@ -73,9 +73,9 @@ namespace MWGui
|
||||||
setVisible(false);
|
setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PersuasionDialog::open()
|
void PersuasionDialog::onOpen()
|
||||||
{
|
{
|
||||||
WindowModal::open();
|
WindowModal::onOpen();
|
||||||
center();
|
center();
|
||||||
|
|
||||||
MWWorld::Ptr player = MWMechanics::getPlayer();
|
MWWorld::Ptr player = MWMechanics::getPlayer();
|
||||||
|
|
|
@ -28,7 +28,7 @@ namespace MWGui
|
||||||
public:
|
public:
|
||||||
PersuasionDialog();
|
PersuasionDialog();
|
||||||
|
|
||||||
virtual void open();
|
virtual void onOpen();
|
||||||
virtual void exit();
|
virtual void exit();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -60,7 +60,7 @@ namespace MWGui
|
||||||
delete mItemSelectionDialog;
|
delete mItemSelectionDialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnchantingDialog::open()
|
void EnchantingDialog::onOpen()
|
||||||
{
|
{
|
||||||
center();
|
center();
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ namespace MWGui
|
||||||
EnchantingDialog();
|
EnchantingDialog();
|
||||||
virtual ~EnchantingDialog();
|
virtual ~EnchantingDialog();
|
||||||
|
|
||||||
virtual void open();
|
virtual void onOpen();
|
||||||
|
|
||||||
virtual void exit();
|
virtual void exit();
|
||||||
|
|
||||||
|
|
|
@ -363,7 +363,7 @@ namespace MWGui
|
||||||
dirtyPreview();
|
dirtyPreview();
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryWindow::open()
|
void InventoryWindow::onOpen()
|
||||||
{
|
{
|
||||||
if (!mPtr.isEmpty())
|
if (!mPtr.isEmpty())
|
||||||
{
|
{
|
||||||
|
|
|
@ -35,7 +35,7 @@ namespace MWGui
|
||||||
public:
|
public:
|
||||||
InventoryWindow(DragAndDrop* dragAndDrop, osg::Group* parent, Resource::ResourceSystem* resourceSystem);
|
InventoryWindow(DragAndDrop* dragAndDrop, osg::Group* parent, Resource::ResourceSystem* resourceSystem);
|
||||||
|
|
||||||
virtual void open();
|
virtual void onOpen();
|
||||||
|
|
||||||
/// start trading, disables item drag&drop
|
/// start trading, disables item drag&drop
|
||||||
void setTrading(bool trading);
|
void setTrading(bool trading);
|
||||||
|
|
|
@ -211,7 +211,7 @@ namespace
|
||||||
button->setPosition(button->getPosition() + MyGUI::IntPoint(diff.width,0));
|
button->setPosition(button->getPosition() + MyGUI::IntPoint(diff.width,0));
|
||||||
}
|
}
|
||||||
|
|
||||||
void open()
|
void onOpen()
|
||||||
{
|
{
|
||||||
if (!MWBase::Environment::get().getWindowManager ()->getJournalAllowed ())
|
if (!MWBase::Environment::get().getWindowManager ()->getJournalAllowed ())
|
||||||
{
|
{
|
||||||
|
@ -240,7 +240,7 @@ namespace
|
||||||
updateShowingPages();
|
updateShowingPages();
|
||||||
}
|
}
|
||||||
|
|
||||||
void close()
|
void onClose()
|
||||||
{
|
{
|
||||||
mModel->unload ();
|
mModel->unload ();
|
||||||
|
|
||||||
|
|
|
@ -128,7 +128,7 @@ namespace MWGui
|
||||||
setAttributeValues();
|
setAttributeValues();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LevelupDialog::open()
|
void LevelupDialog::onOpen()
|
||||||
{
|
{
|
||||||
MWBase::World *world = MWBase::Environment::get().getWorld();
|
MWBase::World *world = MWBase::Environment::get().getWorld();
|
||||||
MWWorld::Ptr player = world->getPlayerPtr();
|
MWWorld::Ptr player = world->getPlayerPtr();
|
||||||
|
|
|
@ -11,7 +11,7 @@ namespace MWGui
|
||||||
public:
|
public:
|
||||||
LevelupDialog();
|
LevelupDialog();
|
||||||
|
|
||||||
virtual void open();
|
virtual void onOpen();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MyGUI::Button* mOkButton;
|
MyGUI::Button* mOkButton;
|
||||||
|
|
|
@ -943,7 +943,7 @@ namespace MWGui
|
||||||
MWBase::Environment::get().getWindowManager()->toggleVisible(GW_Map);
|
MWBase::Environment::get().getWindowManager()->toggleVisible(GW_Map);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MapWindow::open()
|
void MapWindow::onOpen()
|
||||||
{
|
{
|
||||||
ensureGlobalMapLoaded();
|
ensureGlobalMapLoaded();
|
||||||
|
|
||||||
|
@ -1107,9 +1107,9 @@ namespace MWGui
|
||||||
return MyGUI::TextIterator::getOnlyText(mTextEdit->getCaption());
|
return MyGUI::TextIterator::getOnlyText(mTextEdit->getCaption());
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditNoteDialog::open()
|
void EditNoteDialog::onOpen()
|
||||||
{
|
{
|
||||||
WindowModal::open();
|
WindowModal::onOpen();
|
||||||
center();
|
center();
|
||||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mTextEdit);
|
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mTextEdit);
|
||||||
}
|
}
|
||||||
|
|
|
@ -169,7 +169,7 @@ namespace MWGui
|
||||||
public:
|
public:
|
||||||
EditNoteDialog();
|
EditNoteDialog();
|
||||||
|
|
||||||
virtual void open();
|
virtual void onOpen();
|
||||||
virtual void exit();
|
virtual void exit();
|
||||||
|
|
||||||
void showDeleteButton(bool show);
|
void showDeleteButton(bool show);
|
||||||
|
@ -218,7 +218,7 @@ namespace MWGui
|
||||||
|
|
||||||
void ensureGlobalMapLoaded();
|
void ensureGlobalMapLoaded();
|
||||||
|
|
||||||
virtual void open();
|
virtual void onOpen();
|
||||||
|
|
||||||
void onFrame(float dt);
|
void onFrame(float dt);
|
||||||
|
|
||||||
|
|
|
@ -111,7 +111,7 @@ void MerchantRepair::onMouseWheel(MyGUI::Widget* _sender, int _rel)
|
||||||
mList->setViewOffset(MyGUI::IntPoint(0, static_cast<int>(mList->getViewOffset().top + _rel*0.3f)));
|
mList->setViewOffset(MyGUI::IntPoint(0, static_cast<int>(mList->getViewOffset().top + _rel*0.3f)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MerchantRepair::open()
|
void MerchantRepair::onOpen()
|
||||||
{
|
{
|
||||||
center();
|
center();
|
||||||
// Reset scrollbars
|
// Reset scrollbars
|
||||||
|
|
|
@ -12,7 +12,7 @@ class MerchantRepair : public WindowBase
|
||||||
public:
|
public:
|
||||||
MerchantRepair();
|
MerchantRepair();
|
||||||
|
|
||||||
virtual void open();
|
virtual void onOpen();
|
||||||
|
|
||||||
virtual void exit();
|
virtual void exit();
|
||||||
|
|
||||||
|
|
|
@ -200,7 +200,7 @@ namespace MWGui
|
||||||
, mMessageBoxManager(parMessageBoxManager)
|
, mMessageBoxManager(parMessageBoxManager)
|
||||||
, mButtonPressed(-1)
|
, mButtonPressed(-1)
|
||||||
{
|
{
|
||||||
WindowModal::open();
|
WindowModal::onOpen();
|
||||||
|
|
||||||
int textPadding = 10; // padding between text-widget and main-widget
|
int textPadding = 10; // padding between text-widget and main-widget
|
||||||
int textButtonPadding = 10; // padding between the text-widget und the button-widget
|
int textButtonPadding = 10; // padding between the text-widget und the button-widget
|
||||||
|
|
|
@ -590,9 +590,9 @@ namespace MWGui
|
||||||
mParent->onAssignMagicCancel();
|
mParent->onAssignMagicCancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MagicSelectionDialog::open ()
|
void MagicSelectionDialog::onOpen ()
|
||||||
{
|
{
|
||||||
WindowModal::open();
|
WindowModal::onOpen();
|
||||||
|
|
||||||
mMagicList->setModel(new SpellModel(MWMechanics::getPlayer()));
|
mMagicList->setModel(new SpellModel(MWMechanics::getPlayer()));
|
||||||
mMagicList->resetScrollbars();
|
mMagicList->resetScrollbars();
|
||||||
|
|
|
@ -94,7 +94,7 @@ namespace MWGui
|
||||||
public:
|
public:
|
||||||
MagicSelectionDialog(QuickKeysMenu* parent);
|
MagicSelectionDialog(QuickKeysMenu* parent);
|
||||||
|
|
||||||
virtual void open();
|
virtual void onOpen();
|
||||||
virtual void exit();
|
virtual void exit();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -120,9 +120,9 @@ namespace MWGui
|
||||||
okButton->setCaption(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOK", ""));
|
okButton->setCaption(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOK", ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
void RaceDialog::open()
|
void RaceDialog::onOpen()
|
||||||
{
|
{
|
||||||
WindowModal::open();
|
WindowModal::onOpen();
|
||||||
|
|
||||||
updateRaces();
|
updateRaces();
|
||||||
updateSkills();
|
updateSkills();
|
||||||
|
@ -183,7 +183,7 @@ namespace MWGui
|
||||||
updateSpellPowers();
|
updateSpellPowers();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RaceDialog::close()
|
void RaceDialog::onClose()
|
||||||
{
|
{
|
||||||
mPreviewImage->setRenderItemTexture(NULL);
|
mPreviewImage->setRenderItemTexture(NULL);
|
||||||
|
|
||||||
|
|
|
@ -51,8 +51,8 @@ namespace MWGui
|
||||||
void setGender(Gender gender) { mGenderIndex = gender == GM_Male ? 0 : 1; }
|
void setGender(Gender gender) { mGenderIndex = gender == GM_Male ? 0 : 1; }
|
||||||
|
|
||||||
void setNextButtonShow(bool shown);
|
void setNextButtonShow(bool shown);
|
||||||
virtual void open();
|
virtual void onOpen();
|
||||||
virtual void close();
|
virtual void onClose();
|
||||||
|
|
||||||
// Events
|
// Events
|
||||||
typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;
|
typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;
|
||||||
|
|
|
@ -50,7 +50,7 @@ Recharge::Recharge()
|
||||||
setVisible(false);
|
setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Recharge::open()
|
void Recharge::onOpen()
|
||||||
{
|
{
|
||||||
center();
|
center();
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ class Recharge : public WindowBase
|
||||||
public:
|
public:
|
||||||
Recharge();
|
Recharge();
|
||||||
|
|
||||||
virtual void open();
|
virtual void onOpen();
|
||||||
|
|
||||||
virtual void exit();
|
virtual void exit();
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ Repair::Repair()
|
||||||
mToolIcon->eventMouseButtonClick += MyGUI::newDelegate(this, &Repair::onSelectItem);
|
mToolIcon->eventMouseButtonClick += MyGUI::newDelegate(this, &Repair::onSelectItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Repair::open()
|
void Repair::onOpen()
|
||||||
{
|
{
|
||||||
center();
|
center();
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ class Repair : public WindowBase
|
||||||
public:
|
public:
|
||||||
Repair();
|
Repair();
|
||||||
|
|
||||||
virtual void open();
|
virtual void onOpen();
|
||||||
|
|
||||||
virtual void exit();
|
virtual void exit();
|
||||||
|
|
||||||
|
|
|
@ -101,9 +101,9 @@ namespace MWGui
|
||||||
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &ReviewDialog::onOkClicked);
|
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &ReviewDialog::onOkClicked);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReviewDialog::open()
|
void ReviewDialog::onOpen()
|
||||||
{
|
{
|
||||||
WindowModal::open();
|
WindowModal::onOpen();
|
||||||
mUpdateSkillArea = true;
|
mUpdateSkillArea = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ namespace MWGui
|
||||||
void configureSkills(const SkillList& major, const SkillList& minor);
|
void configureSkills(const SkillList& major, const SkillList& minor);
|
||||||
void setSkillValue(ESM::Skill::SkillEnum skillId, const MWMechanics::SkillValue& value);
|
void setSkillValue(ESM::Skill::SkillEnum skillId, const MWMechanics::SkillValue& value);
|
||||||
|
|
||||||
virtual void open();
|
virtual void onOpen();
|
||||||
|
|
||||||
void onFrame(float duration);
|
void onFrame(float duration);
|
||||||
|
|
||||||
|
|
|
@ -118,9 +118,9 @@ namespace MWGui
|
||||||
accept();
|
accept();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SaveGameDialog::open()
|
void SaveGameDialog::onOpen()
|
||||||
{
|
{
|
||||||
WindowModal::open();
|
WindowModal::onOpen();
|
||||||
|
|
||||||
mSaveNameEdit->setCaption ("");
|
mSaveNameEdit->setCaption ("");
|
||||||
if (mSaving)
|
if (mSaving)
|
||||||
|
|
|
@ -17,7 +17,7 @@ namespace MWGui
|
||||||
public:
|
public:
|
||||||
SaveGameDialog();
|
SaveGameDialog();
|
||||||
|
|
||||||
virtual void open();
|
virtual void onOpen();
|
||||||
|
|
||||||
virtual void exit();
|
virtual void exit();
|
||||||
|
|
||||||
|
|
|
@ -553,7 +553,7 @@ namespace MWGui
|
||||||
updateControlsBox ();
|
updateControlsBox ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsWindow::open()
|
void SettingsWindow::onOpen()
|
||||||
{
|
{
|
||||||
updateControlsBox ();
|
updateControlsBox ();
|
||||||
resetScrollbars();
|
resetScrollbars();
|
||||||
|
|
|
@ -15,7 +15,7 @@ namespace MWGui
|
||||||
public:
|
public:
|
||||||
SettingsWindow();
|
SettingsWindow();
|
||||||
|
|
||||||
virtual void open();
|
virtual void onOpen();
|
||||||
|
|
||||||
virtual void exit();
|
virtual void exit();
|
||||||
|
|
||||||
|
|
|
@ -96,9 +96,9 @@ namespace MWGui
|
||||||
mConstantEffect = constant;
|
mConstantEffect = constant;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditEffectDialog::open()
|
void EditEffectDialog::onOpen()
|
||||||
{
|
{
|
||||||
WindowModal::open();
|
WindowModal::onOpen();
|
||||||
center();
|
center();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -415,7 +415,7 @@ namespace MWGui
|
||||||
MWBase::Environment::get().getWindowManager()->removeGuiMode (GM_SpellCreation);
|
MWBase::Environment::get().getWindowManager()->removeGuiMode (GM_SpellCreation);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpellCreationDialog::open()
|
void SpellCreationDialog::onOpen()
|
||||||
{
|
{
|
||||||
center();
|
center();
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ namespace MWGui
|
||||||
public:
|
public:
|
||||||
EditEffectDialog();
|
EditEffectDialog();
|
||||||
|
|
||||||
virtual void open();
|
virtual void onOpen();
|
||||||
virtual void exit();
|
virtual void exit();
|
||||||
|
|
||||||
void setConstantEffect(bool constant);
|
void setConstantEffect(bool constant);
|
||||||
|
@ -150,7 +150,7 @@ namespace MWGui
|
||||||
public:
|
public:
|
||||||
SpellCreationDialog();
|
SpellCreationDialog();
|
||||||
|
|
||||||
virtual void open();
|
virtual void onOpen();
|
||||||
virtual void exit();
|
virtual void exit();
|
||||||
|
|
||||||
void startSpellMaking(MWWorld::Ptr actor);
|
void startSpellMaking(MWWorld::Ptr actor);
|
||||||
|
|
|
@ -62,7 +62,7 @@ namespace MWGui
|
||||||
MWBase::Environment::get().getWindowManager()->toggleVisible(GW_Magic);
|
MWBase::Environment::get().getWindowManager()->toggleVisible(GW_Magic);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpellWindow::open()
|
void SpellWindow::onOpen()
|
||||||
{
|
{
|
||||||
updateSpells();
|
updateSpells();
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ namespace MWGui
|
||||||
|
|
||||||
virtual void onPinToggled();
|
virtual void onPinToggled();
|
||||||
virtual void onTitleDoubleClicked();
|
virtual void onTitleDoubleClicked();
|
||||||
virtual void open();
|
virtual void onOpen();
|
||||||
|
|
||||||
SpellView* mSpellView;
|
SpellView* mSpellView;
|
||||||
SpellIcons* mSpellIcons;
|
SpellIcons* mSpellIcons;
|
||||||
|
|
|
@ -37,7 +37,7 @@ namespace MWGui
|
||||||
void setBounty (int bounty) { if (bounty != mBounty) mChanged = true; this->mBounty = bounty; }
|
void setBounty (int bounty) { if (bounty != mBounty) mChanged = true; this->mBounty = bounty; }
|
||||||
void updateSkillArea();
|
void updateSkillArea();
|
||||||
|
|
||||||
virtual void open() { onWindowResize(mMainWidget->castType<MyGUI::Window>()); }
|
virtual void onOpen() { onWindowResize(mMainWidget->castType<MyGUI::Window>()); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void addSkills(const SkillList &skills, const std::string &titleId, const std::string &titleDefault, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2);
|
void addSkills(const SkillList &skills, const std::string &titleId, const std::string &titleDefault, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2);
|
||||||
|
|
|
@ -42,9 +42,9 @@ namespace MWGui
|
||||||
setText("LabelT", label);
|
setText("LabelT", label);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextInputDialog::open()
|
void TextInputDialog::onOpen()
|
||||||
{
|
{
|
||||||
WindowModal::open();
|
WindowModal::onOpen();
|
||||||
// Make sure the edit box has focus
|
// Make sure the edit box has focus
|
||||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mTextEdit);
|
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mTextEdit);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ namespace MWGui
|
||||||
|
|
||||||
void setNextButtonShow(bool shown);
|
void setNextButtonShow(bool shown);
|
||||||
void setTextLabel(const std::string &label);
|
void setTextLabel(const std::string &label);
|
||||||
virtual void open();
|
virtual void onOpen();
|
||||||
|
|
||||||
/** Event : Dialog finished, OK button clicked.\n
|
/** Event : Dialog finished, OK button clicked.\n
|
||||||
signature : void method()\n
|
signature : void method()\n
|
||||||
|
|
|
@ -55,7 +55,7 @@ namespace MWGui
|
||||||
mProgressBar.setVisible(false);
|
mProgressBar.setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TrainingWindow::open()
|
void TrainingWindow::onOpen()
|
||||||
{
|
{
|
||||||
center();
|
center();
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ namespace MWGui
|
||||||
public:
|
public:
|
||||||
TrainingWindow();
|
TrainingWindow();
|
||||||
|
|
||||||
virtual void open();
|
virtual void onOpen();
|
||||||
|
|
||||||
virtual void exit();
|
virtual void exit();
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ namespace MWGui
|
||||||
getWidget(mProgressText, "ProgressText");
|
getWidget(mProgressText, "ProgressText");
|
||||||
}
|
}
|
||||||
|
|
||||||
void WaitDialogProgressBar::open()
|
void WaitDialogProgressBar::onOpen()
|
||||||
{
|
{
|
||||||
center();
|
center();
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ namespace MWGui
|
||||||
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
void WaitDialog::open()
|
void WaitDialog::onOpen()
|
||||||
{
|
{
|
||||||
if (!MWBase::Environment::get().getWindowManager ()->getRestEnabled ())
|
if (!MWBase::Environment::get().getWindowManager ()->getRestEnabled ())
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace MWGui
|
||||||
public:
|
public:
|
||||||
WaitDialogProgressBar();
|
WaitDialogProgressBar();
|
||||||
|
|
||||||
virtual void open();
|
virtual void onOpen();
|
||||||
|
|
||||||
void setProgress(int cur, int total);
|
void setProgress(int cur, int total);
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ namespace MWGui
|
||||||
public:
|
public:
|
||||||
WaitDialog();
|
WaitDialog();
|
||||||
|
|
||||||
virtual void open();
|
virtual void onOpen();
|
||||||
|
|
||||||
virtual void exit();
|
virtual void exit();
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -22,9 +22,9 @@ namespace MWGui
|
||||||
typedef MyGUI::delegates::CMultiDelegate1<WindowBase*> EventHandle_WindowBase;
|
typedef MyGUI::delegates::CMultiDelegate1<WindowBase*> EventHandle_WindowBase;
|
||||||
|
|
||||||
/// Notify that window has been made visible
|
/// Notify that window has been made visible
|
||||||
virtual void open() {}
|
virtual void onOpen() {}
|
||||||
/// Notify that window has been hidden
|
/// Notify that window has been hidden
|
||||||
virtual void close () {}
|
virtual void onClose () {}
|
||||||
/// Gracefully exits the window
|
/// Gracefully exits the window
|
||||||
virtual void exit() {}
|
virtual void exit() {}
|
||||||
/// Sets the visibility of the window
|
/// Sets the visibility of the window
|
||||||
|
@ -42,8 +42,8 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
WindowModal(const std::string& parLayout);
|
WindowModal(const std::string& parLayout);
|
||||||
virtual void open();
|
virtual void onOpen();
|
||||||
virtual void close();
|
virtual void onClose();
|
||||||
virtual void exit() {}
|
virtual void exit() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue