1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 21:23:52 +00:00

Finally eliminated calls to MWBase::WindowManager in constructors

This commit is contained in:
Britt Mathis 2013-04-10 14:46:21 -04:00
parent d768f6b57e
commit f7383905b7
77 changed files with 300 additions and 309 deletions

View file

@ -26,8 +26,8 @@ namespace
namespace MWGui
{
AlchemyWindow::AlchemyWindow(MWBase::WindowManager& parWindowManager)
: WindowBase("openmw_alchemy_window.layout", parWindowManager)
AlchemyWindow::AlchemyWindow()
: WindowBase("openmw_alchemy_window.layout")
, ContainerBase(0), mApparatus (4), mIngredients (4)
{
getWidget(mCreateButton, "CreateButton");

View file

@ -14,7 +14,7 @@ namespace MWGui
class AlchemyWindow : public WindowBase, public ContainerBase
{
public:
AlchemyWindow(MWBase::WindowManager& parWindowManager);
AlchemyWindow();
virtual void open();

View file

@ -24,8 +24,8 @@ bool sortBirthSigns(const std::pair<std::string, const ESM::BirthSign*>& left, c
}
BirthDialog::BirthDialog(MWBase::WindowManager& parWindowManager)
: WindowModal("openmw_chargen_birth.layout", parWindowManager)
BirthDialog::BirthDialog()
: WindowModal("openmw_chargen_birth.layout")
{
// Centre dialog
center();

View file

@ -13,7 +13,7 @@ namespace MWGui
class BirthDialog : public WindowModal
{
public:
BirthDialog(MWBase::WindowManager& parWindowManager);
BirthDialog();
enum Gender
{

View file

@ -14,8 +14,8 @@
using namespace MWGui;
BookWindow::BookWindow (MWBase::WindowManager& parWindowManager)
: WindowBase("openmw_book.layout", parWindowManager)
BookWindow::BookWindow ()
: WindowBase("openmw_book.layout")
, mTakeButtonShow(true)
, mTakeButtonAllowed(true)
{

View file

@ -12,7 +12,7 @@ namespace MWGui
class BookWindow : public WindowBase
{
public:
BookWindow(MWBase::WindowManager& parWindowManager);
BookWindow();
void open(MWWorld::Ptr book);
void setTakeButtonShow(bool show);

View file

@ -47,7 +47,7 @@ namespace
using namespace MWGui;
CharacterCreation::CharacterCreation(MWBase::WindowManager* _wm)
CharacterCreation::CharacterCreation()
: mNameDialog(0)
, mRaceDialog(0)
, mClassChoiceDialog(0)
@ -58,7 +58,6 @@ CharacterCreation::CharacterCreation(MWBase::WindowManager* _wm)
, mBirthSignDialog(0)
, mReviewDialog(0)
, mGenerateClassStep(0)
, mWM(_wm)
{
mCreationStage = CSE_NotStarted;
}
@ -118,10 +117,10 @@ void CharacterCreation::spawnDialog(const char id)
switch (id)
{
case GM_Name:
mWM->removeDialog(mNameDialog);
MWBase::Environment::get().getWindowManager()->removeDialog(mNameDialog);
mNameDialog = 0;
mNameDialog = new TextInputDialog(*mWM);
mNameDialog->setTextLabel(mWM->getGameSettingString("sName", "Name"));
mNameDialog = new TextInputDialog();
mNameDialog->setTextLabel(MWBase::Environment::get().getWindowManager()->getGameSettingString("sName", "Name"));
mNameDialog->setTextInput(mPlayerName);
mNameDialog->setNextButtonShow(mCreationStage >= CSE_NameChosen);
mNameDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onNameDialogDone);
@ -129,9 +128,9 @@ void CharacterCreation::spawnDialog(const char id)
break;
case GM_Race:
mWM->removeDialog(mRaceDialog);
MWBase::Environment::get().getWindowManager()->removeDialog(mRaceDialog);
mRaceDialog = 0;
mRaceDialog = new RaceDialog(*mWM);
mRaceDialog = new RaceDialog();
mRaceDialog->setNextButtonShow(mCreationStage >= CSE_RaceChosen);
mRaceDialog->setRaceId(mPlayerRaceId);
mRaceDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onRaceDialogDone);
@ -142,9 +141,9 @@ void CharacterCreation::spawnDialog(const char id)
break;
case GM_Class:
mWM->removeDialog(mClassChoiceDialog);
MWBase::Environment::get().getWindowManager()->removeDialog(mClassChoiceDialog);
mClassChoiceDialog = 0;
mClassChoiceDialog = new ClassChoiceDialog(*mWM);
mClassChoiceDialog = new ClassChoiceDialog();
mClassChoiceDialog->eventButtonSelected += MyGUI::newDelegate(this, &CharacterCreation::onClassChoice);
mClassChoiceDialog->setVisible(true);
if (mCreationStage < CSE_RaceChosen)
@ -152,9 +151,9 @@ void CharacterCreation::spawnDialog(const char id)
break;
case GM_ClassPick:
mWM->removeDialog(mPickClassDialog);
MWBase::Environment::get().getWindowManager()->removeDialog(mPickClassDialog);
mPickClassDialog = 0;
mPickClassDialog = new PickClassDialog(*mWM);
mPickClassDialog = new PickClassDialog();
mPickClassDialog->setNextButtonShow(mCreationStage >= CSE_ClassChosen);
mPickClassDialog->setClassId(mPlayerClass.mName);
mPickClassDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onPickClassDialogDone);
@ -165,9 +164,9 @@ void CharacterCreation::spawnDialog(const char id)
break;
case GM_Birth:
mWM->removeDialog(mBirthSignDialog);
MWBase::Environment::get().getWindowManager()->removeDialog(mBirthSignDialog);
mBirthSignDialog = 0;
mBirthSignDialog = new BirthDialog(*mWM);
mBirthSignDialog = new BirthDialog();
mBirthSignDialog->setNextButtonShow(mCreationStage >= CSE_BirthSignChosen);
mBirthSignDialog->setBirthId(mPlayerBirthSignId);
mBirthSignDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onBirthSignDialogDone);
@ -178,9 +177,9 @@ void CharacterCreation::spawnDialog(const char id)
break;
case GM_ClassCreate:
mWM->removeDialog(mCreateClassDialog);
MWBase::Environment::get().getWindowManager()->removeDialog(mCreateClassDialog);
mCreateClassDialog = 0;
mCreateClassDialog = new CreateClassDialog(*mWM);
mCreateClassDialog = new CreateClassDialog();
mCreateClassDialog->setNextButtonShow(mCreationStage >= CSE_ClassChosen);
mCreateClassDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onCreateClassDialogDone);
mCreateClassDialog->eventBack += MyGUI::newDelegate(this, &CharacterCreation::onCreateClassDialogBack);
@ -199,9 +198,9 @@ void CharacterCreation::spawnDialog(const char id)
mCreationStage = CSE_RaceChosen;
break;
case GM_Review:
mWM->removeDialog(mReviewDialog);
MWBase::Environment::get().getWindowManager()->removeDialog(mReviewDialog);
mReviewDialog = 0;
mReviewDialog = new ReviewDialog(*mWM);
mReviewDialog = new ReviewDialog();
mReviewDialog->setPlayerName(mPlayerName);
mReviewDialog->setRace(mPlayerRaceId);
mReviewDialog->setClass(mPlayerClass);
@ -212,7 +211,7 @@ void CharacterCreation::spawnDialog(const char id)
mReviewDialog->setFatigue(mPlayerFatigue);
{
std::map<int, MWMechanics::Stat<int> > attributes = mWM->getPlayerAttributeValues();
std::map<int, MWMechanics::Stat<int> > attributes = MWBase::Environment::get().getWindowManager()->getPlayerAttributeValues();
for (std::map<int, MWMechanics::Stat<int> >::iterator it = attributes.begin();
it != attributes.end(); ++it)
{
@ -221,13 +220,13 @@ void CharacterCreation::spawnDialog(const char id)
}
{
std::map<int, MWMechanics::Stat<float> > skills = mWM->getPlayerSkillValues();
std::map<int, MWMechanics::Stat<float> > skills = MWBase::Environment::get().getWindowManager()->getPlayerSkillValues();
for (std::map<int, MWMechanics::Stat<float> >::iterator it = skills.begin();
it != skills.end(); ++it)
{
mReviewDialog->setSkillValue(static_cast<ESM::Skill::SkillEnum> (it->first), it->second);
}
mReviewDialog->configureSkills(mWM->getPlayerMajorSkills(), mWM->getPlayerMinorSkills());
mReviewDialog->configureSkills(MWBase::Environment::get().getWindowManager()->getPlayerMajorSkills(), MWBase::Environment::get().getWindowManager()->getPlayerMinorSkills());
}
mReviewDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onReviewDialogDone);
@ -257,41 +256,41 @@ void CharacterCreation::setPlayerFatigue (const MWMechanics::DynamicStat<float>&
void CharacterCreation::onReviewDialogDone(WindowBase* parWindow)
{
mWM->removeDialog(mReviewDialog);
MWBase::Environment::get().getWindowManager()->removeDialog(mReviewDialog);
mReviewDialog = 0;
mWM->popGuiMode();
MWBase::Environment::get().getWindowManager()->popGuiMode();
}
void CharacterCreation::onReviewDialogBack()
{
mWM->removeDialog(mReviewDialog);
MWBase::Environment::get().getWindowManager()->removeDialog(mReviewDialog);
mReviewDialog = 0;
mWM->pushGuiMode(GM_Birth);
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Birth);
}
void CharacterCreation::onReviewActivateDialog(int parDialog)
{
mWM->removeDialog(mReviewDialog);
MWBase::Environment::get().getWindowManager()->removeDialog(mReviewDialog);
mReviewDialog = 0;
mCreationStage = CSE_ReviewNext;
mWM->popGuiMode();
MWBase::Environment::get().getWindowManager()->popGuiMode();
switch(parDialog)
{
case ReviewDialog::NAME_DIALOG:
mWM->pushGuiMode(GM_Name);
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Name);
break;
case ReviewDialog::RACE_DIALOG:
mWM->pushGuiMode(GM_Race);
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Race);
break;
case ReviewDialog::CLASS_DIALOG:
mWM->pushGuiMode(GM_Class);
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Class);
break;
case ReviewDialog::BIRTHSIGN_DIALOG:
mWM->pushGuiMode(GM_Birth);
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Birth);
};
}
@ -308,27 +307,27 @@ void CharacterCreation::onPickClassDialogDone(WindowBase* parWindow)
if (klass)
{
mPlayerClass = *klass;
mWM->setPlayerClass(mPlayerClass);
MWBase::Environment::get().getWindowManager()->setPlayerClass(mPlayerClass);
}
mWM->removeDialog(mPickClassDialog);
MWBase::Environment::get().getWindowManager()->removeDialog(mPickClassDialog);
mPickClassDialog = 0;
}
//TODO This bit gets repeated a few times; wrap it in a function
if (mCreationStage == CSE_ReviewNext)
{
mWM->popGuiMode();
mWM->pushGuiMode(GM_Review);
MWBase::Environment::get().getWindowManager()->popGuiMode();
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Review);
}
else if (mCreationStage >= CSE_ClassChosen)
{
mWM->popGuiMode();
mWM->pushGuiMode(GM_Birth);
MWBase::Environment::get().getWindowManager()->popGuiMode();
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Birth);
}
else
{
mCreationStage = CSE_ClassChosen;
mWM->popGuiMode();
MWBase::Environment::get().getWindowManager()->popGuiMode();
}
}
@ -339,34 +338,34 @@ void CharacterCreation::onPickClassDialogBack()
const std::string classId = mPickClassDialog->getClassId();
if (!classId.empty())
MWBase::Environment::get().getMechanicsManager()->setPlayerClass(classId);
mWM->removeDialog(mPickClassDialog);
MWBase::Environment::get().getWindowManager()->removeDialog(mPickClassDialog);
mPickClassDialog = 0;
}
mWM->popGuiMode();
mWM->pushGuiMode(GM_Class);
MWBase::Environment::get().getWindowManager()->popGuiMode();
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Class);
}
void CharacterCreation::onClassChoice(int _index)
{
mWM->removeDialog(mClassChoiceDialog);
MWBase::Environment::get().getWindowManager()->removeDialog(mClassChoiceDialog);
mClassChoiceDialog = 0;
mWM->popGuiMode();
MWBase::Environment::get().getWindowManager()->popGuiMode();
switch(_index)
{
case ClassChoiceDialog::Class_Generate:
mWM->pushGuiMode(GM_ClassGenerate);
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_ClassGenerate);
break;
case ClassChoiceDialog::Class_Pick:
mWM->pushGuiMode(GM_ClassPick);
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_ClassPick);
break;
case ClassChoiceDialog::Class_Create:
mWM->pushGuiMode(GM_ClassCreate);
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_ClassCreate);
break;
case ClassChoiceDialog::Class_Back:
mWM->pushGuiMode(GM_Race);
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Race);
break;
};
@ -377,26 +376,26 @@ void CharacterCreation::onNameDialogDone(WindowBase* parWindow)
if (mNameDialog)
{
mPlayerName = mNameDialog->getTextInput();
mWM->setValue("name", mPlayerName);
MWBase::Environment::get().getWindowManager()->setValue("name", mPlayerName);
MWBase::Environment::get().getMechanicsManager()->setPlayerName(mPlayerName);
mWM->removeDialog(mNameDialog);
MWBase::Environment::get().getWindowManager()->removeDialog(mNameDialog);
mNameDialog = 0;
}
if (mCreationStage == CSE_ReviewNext)
{
mWM->popGuiMode();
mWM->pushGuiMode(GM_Review);
MWBase::Environment::get().getWindowManager()->popGuiMode();
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Review);
}
else if (mCreationStage >= CSE_NameChosen)
{
mWM->popGuiMode();
mWM->pushGuiMode(GM_Race);
MWBase::Environment::get().getWindowManager()->popGuiMode();
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Race);
}
else
{
mCreationStage = CSE_NameChosen;
mWM->popGuiMode();
MWBase::Environment::get().getWindowManager()->popGuiMode();
}
}
@ -414,12 +413,12 @@ void CharacterCreation::onRaceDialogBack()
data.mHair
);
}
mWM->removeDialog(mRaceDialog);
MWBase::Environment::get().getWindowManager()->removeDialog(mRaceDialog);
mRaceDialog = 0;
}
mWM->popGuiMode();
mWM->pushGuiMode(GM_Name);
MWBase::Environment::get().getWindowManager()->popGuiMode();
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Name);
}
void CharacterCreation::onRaceDialogDone(WindowBase* parWindow)
@ -436,26 +435,26 @@ void CharacterCreation::onRaceDialogDone(WindowBase* parWindow)
data.mHair
);
}
mWM->getInventoryWindow()->rebuildAvatar();
MWBase::Environment::get().getWindowManager()->getInventoryWindow()->rebuildAvatar();
mWM->removeDialog(mRaceDialog);
MWBase::Environment::get().getWindowManager()->removeDialog(mRaceDialog);
mRaceDialog = 0;
}
if (mCreationStage == CSE_ReviewNext)
{
mWM->popGuiMode();
mWM->pushGuiMode(GM_Review);
MWBase::Environment::get().getWindowManager()->popGuiMode();
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Review);
}
else if (mCreationStage >= CSE_RaceChosen)
{
mWM->popGuiMode();
mWM->pushGuiMode(GM_Class);
MWBase::Environment::get().getWindowManager()->popGuiMode();
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Class);
}
else
{
mCreationStage = CSE_RaceChosen;
mWM->popGuiMode();
MWBase::Environment::get().getWindowManager()->popGuiMode();
}
}
@ -466,19 +465,19 @@ void CharacterCreation::onBirthSignDialogDone(WindowBase* parWindow)
mPlayerBirthSignId = mBirthSignDialog->getBirthId();
if (!mPlayerBirthSignId.empty())
MWBase::Environment::get().getMechanicsManager()->setPlayerBirthsign(mPlayerBirthSignId);
mWM->removeDialog(mBirthSignDialog);
MWBase::Environment::get().getWindowManager()->removeDialog(mBirthSignDialog);
mBirthSignDialog = 0;
}
if (mCreationStage >= CSE_BirthSignChosen)
{
mWM->popGuiMode();
mWM->pushGuiMode(GM_Review);
MWBase::Environment::get().getWindowManager()->popGuiMode();
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Review);
}
else
{
mCreationStage = CSE_BirthSignChosen;
mWM->popGuiMode();
MWBase::Environment::get().getWindowManager()->popGuiMode();
}
}
@ -487,12 +486,12 @@ void CharacterCreation::onBirthSignDialogBack()
if (mBirthSignDialog)
{
MWBase::Environment::get().getMechanicsManager()->setPlayerBirthsign(mBirthSignDialog->getBirthId());
mWM->removeDialog(mBirthSignDialog);
MWBase::Environment::get().getWindowManager()->removeDialog(mBirthSignDialog);
mBirthSignDialog = 0;
}
mWM->popGuiMode();
mWM->pushGuiMode(GM_Class);
MWBase::Environment::get().getWindowManager()->popGuiMode();
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Class);
}
void CharacterCreation::onCreateClassDialogDone(WindowBase* parWindow)
@ -522,49 +521,49 @@ void CharacterCreation::onCreateClassDialogDone(WindowBase* parWindow)
MWBase::Environment::get().getMechanicsManager()->setPlayerClass(klass);
mPlayerClass = klass;
mWM->setPlayerClass(klass);
MWBase::Environment::get().getWindowManager()->setPlayerClass(klass);
mWM->removeDialog(mCreateClassDialog);
MWBase::Environment::get().getWindowManager()->removeDialog(mCreateClassDialog);
mCreateClassDialog = 0;
}
if (mCreationStage == CSE_ReviewNext)
{
mWM->popGuiMode();
mWM->pushGuiMode(GM_Review);
MWBase::Environment::get().getWindowManager()->popGuiMode();
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Review);
}
else if (mCreationStage >= CSE_ClassChosen)
{
mWM->popGuiMode();
mWM->pushGuiMode(GM_Birth);
MWBase::Environment::get().getWindowManager()->popGuiMode();
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Birth);
}
else
{
mCreationStage = CSE_ClassChosen;
mWM->popGuiMode();
MWBase::Environment::get().getWindowManager()->popGuiMode();
}
}
void CharacterCreation::onCreateClassDialogBack()
{
mWM->removeDialog(mCreateClassDialog);
MWBase::Environment::get().getWindowManager()->removeDialog(mCreateClassDialog);
mCreateClassDialog = 0;
mWM->popGuiMode();
mWM->pushGuiMode(GM_Class);
MWBase::Environment::get().getWindowManager()->popGuiMode();
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Class);
}
void CharacterCreation::onClassQuestionChosen(int _index)
{
MWBase::Environment::get().getSoundManager()->stopSay();
mWM->removeDialog(mGenerateClassQuestionDialog);
MWBase::Environment::get().getWindowManager()->removeDialog(mGenerateClassQuestionDialog);
mGenerateClassQuestionDialog = 0;
if (_index < 0 || _index >= 3)
{
mWM->popGuiMode();
mWM->pushGuiMode(GM_Class);
MWBase::Environment::get().getWindowManager()->popGuiMode();
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Class);
return;
}
@ -637,10 +636,10 @@ void CharacterCreation::showClassQuestionDialog()
}
}
mWM->removeDialog(mGenerateClassResultDialog);
MWBase::Environment::get().getWindowManager()->removeDialog(mGenerateClassResultDialog);
mGenerateClassResultDialog = 0;
mGenerateClassResultDialog = new GenerateClassResultDialog(*mWM);
mGenerateClassResultDialog = new GenerateClassResultDialog();
mGenerateClassResultDialog->setClassId(mGenerateClass);
mGenerateClassResultDialog->eventBack += MyGUI::newDelegate(this, &CharacterCreation::onGenerateClassBack);
mGenerateClassResultDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onGenerateClassDone);
@ -650,15 +649,15 @@ void CharacterCreation::showClassQuestionDialog()
if (mGenerateClassStep > 10)
{
mWM->popGuiMode();
mWM->pushGuiMode(GM_Class);
MWBase::Environment::get().getWindowManager()->popGuiMode();
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Class);
return;
}
mWM->removeDialog(mGenerateClassQuestionDialog);
MWBase::Environment::get().getWindowManager()->removeDialog(mGenerateClassQuestionDialog);
mGenerateClassQuestionDialog = 0;
mGenerateClassQuestionDialog = new InfoBoxDialog(*mWM);
mGenerateClassQuestionDialog = new InfoBoxDialog();
InfoBoxDialog::ButtonList buttons;
mGenerateClassQuestionDialog->setText(sGenerateClassSteps(mGenerateClassStep).mText);
@ -674,18 +673,18 @@ void CharacterCreation::showClassQuestionDialog()
void CharacterCreation::onGenerateClassBack()
{
mWM->removeDialog(mGenerateClassResultDialog);
MWBase::Environment::get().getWindowManager()->removeDialog(mGenerateClassResultDialog);
mGenerateClassResultDialog = 0;
MWBase::Environment::get().getMechanicsManager()->setPlayerClass(mGenerateClass);
mWM->popGuiMode();
mWM->pushGuiMode(GM_Class);
MWBase::Environment::get().getWindowManager()->popGuiMode();
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Class);
}
void CharacterCreation::onGenerateClassDone(WindowBase* parWindow)
{
mWM->removeDialog(mGenerateClassResultDialog);
MWBase::Environment::get().getWindowManager()->removeDialog(mGenerateClassResultDialog);
mGenerateClassResultDialog = 0;
MWBase::Environment::get().getMechanicsManager()->setPlayerClass(mGenerateClass);
@ -694,22 +693,22 @@ void CharacterCreation::onGenerateClassDone(WindowBase* parWindow)
MWBase::Environment::get().getWorld()->getStore().get<ESM::Class>().find(mGenerateClass);
mPlayerClass = *klass;
mWM->setPlayerClass(mPlayerClass);
MWBase::Environment::get().getWindowManager()->setPlayerClass(mPlayerClass);
if (mCreationStage == CSE_ReviewNext)
{
mWM->popGuiMode();
mWM->pushGuiMode(GM_Review);
MWBase::Environment::get().getWindowManager()->popGuiMode();
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Review);
}
else if (mCreationStage >= CSE_ClassChosen)
{
mWM->popGuiMode();
mWM->pushGuiMode(GM_Birth);
MWBase::Environment::get().getWindowManager()->popGuiMode();
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Birth);
}
else
{
mCreationStage = CSE_ClassChosen;
mWM->popGuiMode();
MWBase::Environment::get().getWindowManager()->popGuiMode();
}
}

View file

@ -29,7 +29,7 @@ namespace MWGui
public:
typedef std::vector<int> SkillList;
CharacterCreation(MWBase::WindowManager* _wm);
CharacterCreation();
~CharacterCreation();
//Show a dialog
@ -58,8 +58,6 @@ namespace MWGui
BirthDialog* mBirthSignDialog;
ReviewDialog* mReviewDialog;
MWBase::WindowManager* mWM;
//Player data
std::string mPlayerName;
std::string mPlayerRaceId;

View file

@ -20,8 +20,8 @@ using namespace MWGui;
/* GenerateClassResultDialog */
GenerateClassResultDialog::GenerateClassResultDialog(MWBase::WindowManager& parWindowManager)
: WindowModal("openmw_chargen_generate_class_result.layout", parWindowManager)
GenerateClassResultDialog::GenerateClassResultDialog()
: WindowModal("openmw_chargen_generate_class_result.layout")
{
// Centre dialog
center();
@ -67,8 +67,8 @@ void GenerateClassResultDialog::onBackClicked(MyGUI::Widget* _sender)
/* PickClassDialog */
PickClassDialog::PickClassDialog(MWBase::WindowManager& parWindowManager)
: WindowModal("openmw_chargen_class.layout", parWindowManager)
PickClassDialog::PickClassDialog()
: WindowModal("openmw_chargen_class.layout")
{
// Centre dialog
center();
@ -272,8 +272,8 @@ void InfoBoxDialog::layoutVertically(MyGUI::Widget* widget, int margin)
widget->setSize(width, pos);
}
InfoBoxDialog::InfoBoxDialog(MWBase::WindowManager& parWindowManager)
: WindowModal("openmw_infobox.layout", parWindowManager)
InfoBoxDialog::InfoBoxDialog()
: WindowModal("openmw_infobox.layout")
, mCurrentButton(-1)
{
getWidget(mTextBox, "TextBox");
@ -356,8 +356,8 @@ void InfoBoxDialog::onButtonClicked(MyGUI::Widget* _sender)
/* ClassChoiceDialog */
ClassChoiceDialog::ClassChoiceDialog(MWBase::WindowManager& parWindowManager)
: InfoBoxDialog(parWindowManager)
ClassChoiceDialog::ClassChoiceDialog()
: InfoBoxDialog()
{
setText("");
ButtonList buttons;
@ -370,8 +370,8 @@ ClassChoiceDialog::ClassChoiceDialog(MWBase::WindowManager& parWindowManager)
/* CreateClassDialog */
CreateClassDialog::CreateClassDialog(MWBase::WindowManager& parWindowManager)
: WindowModal("openmw_chargen_create_class.layout", parWindowManager)
CreateClassDialog::CreateClassDialog()
: WindowModal("openmw_chargen_create_class.layout")
, mSpecDialog(NULL)
, mAttribDialog(NULL)
, mSkillDialog(NULL)
@ -540,7 +540,7 @@ void CreateClassDialog::onDialogCancel()
void CreateClassDialog::onSpecializationClicked(MyGUI::Widget* _sender)
{
delete mSpecDialog;
mSpecDialog = new SelectSpecializationDialog(*MWBase::Environment::get().getWindowManager());
mSpecDialog = new SelectSpecializationDialog();
mSpecDialog->eventCancel += MyGUI::newDelegate(this, &CreateClassDialog::onDialogCancel);
mSpecDialog->eventItemSelected += MyGUI::newDelegate(this, &CreateClassDialog::onSpecializationSelected);
mSpecDialog->setVisible(true);
@ -571,7 +571,7 @@ void CreateClassDialog::setSpecialization(int id)
void CreateClassDialog::onAttributeClicked(Widgets::MWAttributePtr _sender)
{
delete mAttribDialog;
mAttribDialog = new SelectAttributeDialog(*MWBase::Environment::get().getWindowManager());
mAttribDialog = new SelectAttributeDialog();
mAffectedAttribute = _sender;
mAttribDialog->eventCancel += MyGUI::newDelegate(this, &CreateClassDialog::onDialogCancel);
mAttribDialog->eventItemSelected += MyGUI::newDelegate(this, &CreateClassDialog::onAttributeSelected);
@ -601,7 +601,7 @@ void CreateClassDialog::onAttributeSelected()
void CreateClassDialog::onSkillClicked(Widgets::MWSkillPtr _sender)
{
delete mSkillDialog;
mSkillDialog = new SelectSkillDialog(*MWBase::Environment::get().getWindowManager());
mSkillDialog = new SelectSkillDialog();
mAffectedSkill = _sender;
mSkillDialog->eventCancel += MyGUI::newDelegate(this, &CreateClassDialog::onDialogCancel);
mSkillDialog->eventItemSelected += MyGUI::newDelegate(this, &CreateClassDialog::onSkillSelected);
@ -633,7 +633,7 @@ void CreateClassDialog::onSkillSelected()
void CreateClassDialog::onDescriptionClicked(MyGUI::Widget* _sender)
{
mDescDialog = new DescriptionDialog(*MWBase::Environment::get().getWindowManager());
mDescDialog = new DescriptionDialog();
mDescDialog->setTextInput(mDescription);
mDescDialog->eventDone += MyGUI::newDelegate(this, &CreateClassDialog::onDescriptionEntered);
mDescDialog->setVisible(true);
@ -660,8 +660,8 @@ void CreateClassDialog::onBackClicked(MyGUI::Widget* _sender)
/* SelectSpecializationDialog */
SelectSpecializationDialog::SelectSpecializationDialog(MWBase::WindowManager& parWindowManager)
: WindowModal("openmw_chargen_select_specialization.layout", parWindowManager)
SelectSpecializationDialog::SelectSpecializationDialog()
: WindowModal("openmw_chargen_select_specialization.layout")
{
// Centre dialog
center();
@ -720,8 +720,8 @@ void SelectSpecializationDialog::onCancelClicked(MyGUI::Widget* _sender)
/* SelectAttributeDialog */
SelectAttributeDialog::SelectAttributeDialog(MWBase::WindowManager& parWindowManager)
: WindowModal("openmw_chargen_select_attribute.layout", parWindowManager)
SelectAttributeDialog::SelectAttributeDialog()
: WindowModal("openmw_chargen_select_attribute.layout")
{
// Centre dialog
center();
@ -766,8 +766,8 @@ void SelectAttributeDialog::onCancelClicked(MyGUI::Widget* _sender)
/* SelectSkillDialog */
SelectSkillDialog::SelectSkillDialog(MWBase::WindowManager& parWindowManager)
: WindowModal("openmw_chargen_select_skill.layout", parWindowManager)
SelectSkillDialog::SelectSkillDialog()
: WindowModal("openmw_chargen_select_skill.layout")
{
// Centre dialog
center();
@ -856,8 +856,8 @@ void SelectSkillDialog::onCancelClicked(MyGUI::Widget* _sender)
/* DescriptionDialog */
DescriptionDialog::DescriptionDialog(MWBase::WindowManager& parWindowManager)
: WindowModal("openmw_chargen_class_description.layout", parWindowManager)
DescriptionDialog::DescriptionDialog()
: WindowModal("openmw_chargen_class_description.layout")
{
// Centre dialog
center();

View file

@ -15,7 +15,7 @@ namespace MWGui
class InfoBoxDialog : public WindowModal
{
public:
InfoBoxDialog(MWBase::WindowManager& parWindowManager);
InfoBoxDialog();
typedef std::vector<std::string> ButtonList;
@ -60,13 +60,13 @@ namespace MWGui
Class_Create = 2,
Class_Back = 3
};
ClassChoiceDialog(MWBase::WindowManager& parWindowManager);
ClassChoiceDialog();
};
class GenerateClassResultDialog : public WindowModal
{
public:
GenerateClassResultDialog(MWBase::WindowManager& parWindowManager);
GenerateClassResultDialog();
std::string getClassId() const;
void setClassId(const std::string &classId);
@ -93,7 +93,7 @@ namespace MWGui
class PickClassDialog : public WindowModal
{
public:
PickClassDialog(MWBase::WindowManager& parWindowManager);
PickClassDialog();
const std::string &getClassId() const { return mCurrentClassId; }
void setClassId(const std::string &classId);
@ -132,7 +132,7 @@ namespace MWGui
class SelectSpecializationDialog : public WindowModal
{
public:
SelectSpecializationDialog(MWBase::WindowManager& parWindowManager);
SelectSpecializationDialog();
~SelectSpecializationDialog();
ESM::Class::Specialization getSpecializationId() const { return mSpecializationId; }
@ -163,7 +163,7 @@ namespace MWGui
class SelectAttributeDialog : public WindowModal
{
public:
SelectAttributeDialog(MWBase::WindowManager& parWindowManager);
SelectAttributeDialog();
~SelectAttributeDialog();
ESM::Attribute::AttributeID getAttributeId() const { return mAttributeId; }
@ -192,7 +192,7 @@ namespace MWGui
class SelectSkillDialog : public WindowModal
{
public:
SelectSkillDialog(MWBase::WindowManager& parWindowManager);
SelectSkillDialog();
~SelectSkillDialog();
ESM::Skill::SkillEnum getSkillId() const { return mSkillId; }
@ -225,7 +225,7 @@ namespace MWGui
class DescriptionDialog : public WindowModal
{
public:
DescriptionDialog(MWBase::WindowManager& parWindowManager);
DescriptionDialog();
~DescriptionDialog();
std::string getTextInput() const { return mTextEdit ? mTextEdit->getOnlyText() : ""; }
@ -241,7 +241,7 @@ namespace MWGui
class CreateClassDialog : public WindowModal
{
public:
CreateClassDialog(MWBase::WindowManager& parWindowManager);
CreateClassDialog();
virtual ~CreateClassDialog();
std::string getName() const;

View file

@ -13,9 +13,9 @@
namespace MWGui
{
CompanionWindow::CompanionWindow(MWBase::WindowManager &parWindowManager, DragAndDrop *dragAndDrop, MessageBoxManager* manager)
CompanionWindow::CompanionWindow(DragAndDrop *dragAndDrop, MessageBoxManager* manager)
: ContainerBase(dragAndDrop)
, WindowBase("openmw_companion_window.layout", parWindowManager)
, WindowBase("openmw_companion_window.layout")
, mMessageBoxManager(manager)
{
MyGUI::ScrollView* itemView;

View file

@ -11,7 +11,7 @@ namespace MWGui
class CompanionWindow : public ContainerBase, public WindowBase
{
public:
CompanionWindow(MWBase::WindowManager& parWindowManager,DragAndDrop* dragAndDrop, MessageBoxManager* manager);
CompanionWindow(DragAndDrop* dragAndDrop, MessageBoxManager* manager);
virtual ~CompanionWindow() {}
void open(MWWorld::Ptr npc);

View file

@ -7,8 +7,8 @@
namespace MWGui
{
ConfirmationDialog::ConfirmationDialog(MWBase::WindowManager& parWindowManager) :
WindowModal("openmw_confirmation_dialog.layout", parWindowManager)
ConfirmationDialog::ConfirmationDialog() :
WindowModal("openmw_confirmation_dialog.layout")
{
getWidget(mMessage, "Message");
getWidget(mOkButton, "OkButton");

View file

@ -8,7 +8,7 @@ namespace MWGui
class ConfirmationDialog : public WindowModal
{
public:
ConfirmationDialog(MWBase::WindowManager& parWindowManager);
ConfirmationDialog();
void open(const std::string& message);
typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;

View file

@ -649,9 +649,9 @@ MWWorld::ContainerStore& ContainerBase::getContainerStore()
// ------------------------------------------------------------------------------------------------
ContainerWindow::ContainerWindow(MWBase::WindowManager& parWindowManager,DragAndDrop* dragAndDrop)
ContainerWindow::ContainerWindow(DragAndDrop* dragAndDrop)
: ContainerBase(dragAndDrop)
, WindowBase("openmw_container_window.layout", parWindowManager)
, WindowBase("openmw_container_window.layout")
{
getWidget(mDisposeCorpseButton, "DisposeCorpseButton");
getWidget(mTakeButton, "TakeButton");

View file

@ -134,7 +134,7 @@ namespace MWGui
class ContainerWindow : public ContainerBase, public WindowBase
{
public:
ContainerWindow(MWBase::WindowManager& parWindowManager,DragAndDrop* dragAndDrop);
ContainerWindow(DragAndDrop* dragAndDrop);
virtual ~ContainerWindow();

View file

@ -7,8 +7,8 @@
namespace MWGui
{
CountDialog::CountDialog(MWBase::WindowManager& parWindowManager) :
WindowModal("openmw_count_window.layout", parWindowManager)
CountDialog::CountDialog() :
WindowModal("openmw_count_window.layout")
{
getWidget(mSlider, "CountSlider");
getWidget(mItemEdit, "ItemEdit");

View file

@ -8,7 +8,7 @@ namespace MWGui
class CountDialog : public WindowModal
{
public:
CountDialog(MWBase::WindowManager& parWindowManager);
CountDialog();
void open(const std::string& item, const std::string& message, const int maxCount);
typedef MyGUI::delegates::CMultiDelegate2<MyGUI::Widget*, int> EventHandle_WidgetInt;

View file

@ -55,8 +55,8 @@ bool sortByLength (const std::string& left, const std::string& right)
PersuasionDialog::PersuasionDialog(MWBase::WindowManager &parWindowManager)
: WindowModal("openmw_persuasion_dialog.layout", parWindowManager)
PersuasionDialog::PersuasionDialog()
: WindowModal("openmw_persuasion_dialog.layout")
{
getWidget(mCancelButton, "CancelButton");
getWidget(mAdmireButton, "AdmireButton");
@ -124,9 +124,9 @@ void PersuasionDialog::open()
// --------------------------------------------------------------------------------------------------
DialogueWindow::DialogueWindow(MWBase::WindowManager& parWindowManager)
: WindowBase("openmw_dialogue_window.layout", parWindowManager)
, mPersuasionDialog(parWindowManager)
DialogueWindow::DialogueWindow()
: WindowBase("openmw_dialogue_window.layout")
, mPersuasionDialog()
, mEnabled(false)
, mServices(0)
{

View file

@ -29,7 +29,7 @@ namespace MWGui
class PersuasionDialog : public WindowModal
{
public:
PersuasionDialog(MWBase::WindowManager& parWindowManager);
PersuasionDialog();
virtual void open();
@ -50,7 +50,7 @@ namespace MWGui
class DialogueWindow: public WindowBase, public ReferenceInterface
{
public:
DialogueWindow(MWBase::WindowManager& parWindowManager);
DialogueWindow();
// Events
typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;

View file

@ -15,9 +15,9 @@ namespace MWGui
{
EnchantingDialog::EnchantingDialog(MWBase::WindowManager &parWindowManager)
: WindowBase("openmw_enchanting_dialog.layout", parWindowManager)
, EffectEditorBase(parWindowManager)
EnchantingDialog::EnchantingDialog()
: WindowBase("openmw_enchanting_dialog.layout")
, EffectEditorBase()
, mItemSelectionDialog(NULL)
{
getWidget(mName, "NameEdit");
@ -139,7 +139,7 @@ namespace MWGui
{
delete mItemSelectionDialog;
mItemSelectionDialog = new ItemSelectionDialog("#{sEnchantItems}",
ContainerBase::Filter_Apparel|ContainerBase::Filter_Weapon|ContainerBase::Filter_NoMagic, *MWBase::Environment::get().getWindowManager());
ContainerBase::Filter_Apparel|ContainerBase::Filter_Weapon|ContainerBase::Filter_NoMagic);
mItemSelectionDialog->eventItemSelected += MyGUI::newDelegate(this, &EnchantingDialog::onItemSelected);
mItemSelectionDialog->eventDialogCanceled += MyGUI::newDelegate(this, &EnchantingDialog::onItemCancel);
mItemSelectionDialog->setVisible(true);
@ -227,7 +227,7 @@ namespace MWGui
{
delete mItemSelectionDialog;
mItemSelectionDialog = new ItemSelectionDialog("#{sSoulGemsWithSouls}",
ContainerBase::Filter_Misc|ContainerBase::Filter_ChargedSoulstones, *MWBase::Environment::get().getWindowManager());
ContainerBase::Filter_Misc|ContainerBase::Filter_ChargedSoulstones);
mItemSelectionDialog->eventItemSelected += MyGUI::newDelegate(this, &EnchantingDialog::onSoulSelected);
mItemSelectionDialog->eventDialogCanceled += MyGUI::newDelegate(this, &EnchantingDialog::onSoulCancel);
mItemSelectionDialog->setVisible(true);

View file

@ -17,7 +17,7 @@ namespace MWGui
class EnchantingDialog : public WindowBase, public ReferenceInterface, public EffectEditorBase
{
public:
EnchantingDialog(MWBase::WindowManager& parWindowManager);
EnchantingDialog();
virtual ~EnchantingDialog();
virtual void open();

View file

@ -30,9 +30,9 @@
namespace MWGui
{
InventoryWindow::InventoryWindow(MWBase::WindowManager& parWindowManager,DragAndDrop* dragAndDrop)
InventoryWindow::InventoryWindow(DragAndDrop* dragAndDrop)
: ContainerBase(dragAndDrop)
, WindowPinnableBase("openmw_inventory_window.layout", parWindowManager)
, WindowPinnableBase("openmw_inventory_window.layout")
, mTrading(false)
, mLastXSize(0)
, mLastYSize(0)

View file

@ -12,7 +12,7 @@ namespace MWGui
class InventoryWindow : public ContainerBase, public WindowPinnableBase
{
public:
InventoryWindow(MWBase::WindowManager& parWindowManager,DragAndDrop* dragAndDrop);
InventoryWindow(DragAndDrop* dragAndDrop);
virtual void open();

View file

@ -3,9 +3,9 @@
namespace MWGui
{
ItemSelectionDialog::ItemSelectionDialog(const std::string &label, int filter, MWBase::WindowManager& parWindowManager)
ItemSelectionDialog::ItemSelectionDialog(const std::string &label, int filter)
: ContainerBase(NULL)
, WindowModal("openmw_itemselection_dialog.layout", parWindowManager)
, WindowModal("openmw_itemselection_dialog.layout")
{
mFilter = filter;

View file

@ -8,7 +8,7 @@ namespace MWGui
class ItemSelectionDialog : public ContainerBase, public WindowModal
{
public:
ItemSelectionDialog(const std::string& label, int filter, MWBase::WindowManager& parWindowManager);
ItemSelectionDialog(const std::string& label, int filter);
typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;
typedef MyGUI::delegates::CMultiDelegate1<MWWorld::Ptr> EventHandle_Item;

View file

@ -81,8 +81,8 @@ book formatText(std::string text,book mBook,int maxLine, int lineSize)
}
MWGui::JournalWindow::JournalWindow (MWBase::WindowManager& parWindowManager)
: WindowBase("openmw_journal.layout", parWindowManager)
MWGui::JournalWindow::JournalWindow ()
: WindowBase("openmw_journal.layout")
, mPageNumber(0)
{
mMainWidget->setVisible(false);

View file

@ -14,7 +14,7 @@ namespace MWGui
class JournalWindow : public WindowBase
{
public:
JournalWindow(MWBase::WindowManager& parWindowManager);
JournalWindow();
virtual void open();
virtual void close();

View file

@ -18,8 +18,8 @@
namespace MWGui
{
LevelupDialog::LevelupDialog(MWBase::WindowManager &parWindowManager)
: WindowBase("openmw_levelup_dialog.layout", parWindowManager)
LevelupDialog::LevelupDialog()
: WindowBase("openmw_levelup_dialog.layout")
{
getWidget(mOkButton, "OkButton");
getWidget(mClassImage, "ClassImage");

View file

@ -9,7 +9,7 @@ namespace MWGui
class LevelupDialog : public WindowBase
{
public:
LevelupDialog(MWBase::WindowManager& parWindowManager);
LevelupDialog();
virtual void open();

View file

@ -23,10 +23,10 @@
namespace MWGui
{
LoadingScreen::LoadingScreen(Ogre::SceneManager* sceneMgr, Ogre::RenderWindow* rw, MWBase::WindowManager& parWindowManager)
LoadingScreen::LoadingScreen(Ogre::SceneManager* sceneMgr, Ogre::RenderWindow* rw)
: mSceneMgr(sceneMgr)
, mWindow(rw)
, WindowBase("openmw_loading_screen.layout", parWindowManager)
, WindowBase("openmw_loading_screen.layout")
, mLoadingOn(false)
, mLastRenderTime(0.f)
, mLastWallpaperChangeTime(0.f)

View file

@ -11,7 +11,7 @@ namespace MWGui
class LoadingScreen : public WindowBase
{
public:
LoadingScreen(Ogre::SceneManager* sceneMgr, Ogre::RenderWindow* rw, MWBase::WindowManager& parWindowManager);
LoadingScreen(Ogre::SceneManager* sceneMgr, Ogre::RenderWindow* rw);
virtual ~LoadingScreen();
void setLoadingProgress (const std::string& stage, int depth, int current, int total);

View file

@ -262,8 +262,8 @@ void LocalMapBase::setPlayerDir(const float x, const float y)
// ------------------------------------------------------------------------------------------
MapWindow::MapWindow(MWBase::WindowManager& parWindowManager, const std::string& cacheDir)
: MWGui::WindowPinnableBase("openmw_map_window.layout", parWindowManager)
MapWindow::MapWindow(const std::string& cacheDir)
: MWGui::WindowPinnableBase("openmw_map_window.layout")
, mGlobal(false)
{
setCoord(500,0,320,300);

View file

@ -65,7 +65,7 @@ namespace MWGui
class MapWindow : public MWGui::WindowPinnableBase, public LocalMapBase
{
public:
MapWindow(MWBase::WindowManager& parWindowManager, const std::string& cacheDir);
MapWindow(const std::string& cacheDir);
virtual ~MapWindow();
void setCellName(const std::string& cellName);

View file

@ -19,8 +19,8 @@
namespace MWGui
{
MerchantRepair::MerchantRepair(MWBase::WindowManager &parWindowManager)
: WindowBase("openmw_merchantrepair.layout", parWindowManager)
MerchantRepair::MerchantRepair()
: WindowBase("openmw_merchantrepair.layout")
{
getWidget(mList, "RepairView");
getWidget(mOkButton, "OkButton");

View file

@ -12,7 +12,7 @@ namespace MWGui
class MerchantRepair : public WindowBase
{
public:
MerchantRepair(MWBase::WindowManager &parWindowManager);
MerchantRepair();
virtual void open();

View file

@ -7,7 +7,7 @@
using namespace MWGui;
MessageBoxManager::MessageBoxManager (MWBase::WindowManager* windowManager)
MessageBoxManager::MessageBoxManager ()
{
// defines
mMessageBoxSpeed = 0.1;
@ -212,7 +212,7 @@ int MessageBox::getHeight ()
InteractiveMessageBox::InteractiveMessageBox(MessageBoxManager& parMessageBoxManager, const std::string& message, const std::vector<std::string>& buttons)
: WindowModal("openmw_interactive_messagebox.layout", *MWBase::Environment::get().getWindowManager())
: WindowModal("openmw_interactive_messagebox.layout")
, mMessageBoxManager(parMessageBoxManager)
, mButtonPressed(-1)
{

View file

@ -31,7 +31,7 @@ namespace MWGui
class MessageBoxManager
{
public:
MessageBoxManager (MWBase::WindowManager* windowManager);
MessageBoxManager ();
void onFrame (float frameDuration);
void createMessageBox (const std::string& message);
bool createInteractiveMessageBox (const std::string& message, const std::vector<std::string>& buttons);

View file

@ -43,8 +43,8 @@ namespace
namespace MWGui
{
QuickKeysMenu::QuickKeysMenu(MWBase::WindowManager& parWindowManager)
: WindowBase("openmw_quickkeys_menu.layout", parWindowManager)
QuickKeysMenu::QuickKeysMenu()
: WindowBase("openmw_quickkeys_menu.layout")
, mAssignDialog(0)
, mItemSelectionDialog(0)
, mMagicSelectionDialog(0)
@ -109,7 +109,7 @@ namespace MWGui
{
// open assign dialog
if (!mAssignDialog)
mAssignDialog = new QuickKeysMenuAssign(*MWBase::Environment::get().getWindowManager(), this);
mAssignDialog = new QuickKeysMenuAssign(this);
mAssignDialog->setVisible (true);
}
}
@ -124,7 +124,7 @@ namespace MWGui
{
if (!mItemSelectionDialog )
{
mItemSelectionDialog = new ItemSelectionDialog("#{sQuickMenu6}", ContainerBase::Filter_All, *MWBase::Environment::get().getWindowManager());
mItemSelectionDialog = new ItemSelectionDialog("#{sQuickMenu6}", ContainerBase::Filter_All);
mItemSelectionDialog->eventItemSelected += MyGUI::newDelegate(this, &QuickKeysMenu::onAssignItem);
mItemSelectionDialog->eventDialogCanceled += MyGUI::newDelegate(this, &QuickKeysMenu::onAssignItemCancel);
}
@ -139,7 +139,7 @@ namespace MWGui
{
if (!mMagicSelectionDialog )
{
mMagicSelectionDialog = new MagicSelectionDialog(*MWBase::Environment::get().getWindowManager(), this);
mMagicSelectionDialog = new MagicSelectionDialog(this);
}
mMagicSelectionDialog->setVisible(true);
@ -352,8 +352,8 @@ namespace MWGui
// ---------------------------------------------------------------------------------------------------------
QuickKeysMenuAssign::QuickKeysMenuAssign (MWBase::WindowManager &parWindowManager, QuickKeysMenu* parent)
: WindowModal("openmw_quickkeys_menu_assign.layout", parWindowManager)
QuickKeysMenuAssign::QuickKeysMenuAssign (QuickKeysMenu* parent)
: WindowModal("openmw_quickkeys_menu_assign.layout")
, mParent(parent)
{
getWidget(mLabel, "Label");
@ -399,8 +399,8 @@ namespace MWGui
// ---------------------------------------------------------------------------------------------------------
MagicSelectionDialog::MagicSelectionDialog(MWBase::WindowManager &parWindowManager, QuickKeysMenu* parent)
: WindowModal("openmw_magicselection_dialog.layout", parWindowManager)
MagicSelectionDialog::MagicSelectionDialog(QuickKeysMenu* parent)
: WindowModal("openmw_magicselection_dialog.layout")
, mParent(parent)
, mWidth(0)
, mHeight(0)

View file

@ -16,7 +16,7 @@ namespace MWGui
class QuickKeysMenu : public WindowBase
{
public:
QuickKeysMenu(MWBase::WindowManager& parWindowManager);
QuickKeysMenu();
~QuickKeysMenu();
@ -64,7 +64,7 @@ namespace MWGui
class QuickKeysMenuAssign : public WindowModal
{
public:
QuickKeysMenuAssign(MWBase::WindowManager& parWindowManager, QuickKeysMenu* parent);
QuickKeysMenuAssign(QuickKeysMenu* parent);
private:
MyGUI::TextBox* mLabel;
@ -79,7 +79,7 @@ namespace MWGui
class MagicSelectionDialog : public WindowModal
{
public:
MagicSelectionDialog(MWBase::WindowManager& parWindowManager, QuickKeysMenu* parent);
MagicSelectionDialog(QuickKeysMenu* parent);
virtual void open();

View file

@ -62,8 +62,8 @@ int countParts(const std::string &part, const std::string &race, bool male)
}
}
RaceDialog::RaceDialog(MWBase::WindowManager& parWindowManager)
: WindowModal("openmw_chargen_race.layout", parWindowManager)
RaceDialog::RaceDialog()
: WindowModal("openmw_chargen_race.layout")
, mGenderIndex(0)
, mFaceIndex(0)
, mHairIndex(0)

View file

@ -26,7 +26,7 @@ namespace MWGui
class RaceDialog : public WindowModal
{
public:
RaceDialog(MWBase::WindowManager& parWindowManager);
RaceDialog();
enum Gender
{

View file

@ -15,8 +15,8 @@
namespace MWGui
{
Repair::Repair(MWBase::WindowManager &parWindowManager)
: WindowBase("openmw_repair.layout", parWindowManager)
Repair::Repair()
: WindowBase("openmw_repair.layout")
{
getWidget(mRepairBox, "RepairBox");
getWidget(mRepairView, "RepairView");

View file

@ -12,7 +12,7 @@ namespace MWGui
class Repair : public WindowBase
{
public:
Repair(MWBase::WindowManager &parWindowManager);
Repair();
virtual void open();

View file

@ -22,8 +22,8 @@ using namespace Widgets;
const int ReviewDialog::sLineHeight = 18;
ReviewDialog::ReviewDialog(MWBase::WindowManager& parWindowManager)
: WindowModal("openmw_chargen_review.layout", parWindowManager)
ReviewDialog::ReviewDialog()
: WindowModal("openmw_chargen_review.layout")
, mLastPos(0)
{
// Centre dialog

View file

@ -28,7 +28,7 @@ namespace MWGui
};
typedef std::vector<int> SkillList;
ReviewDialog(MWBase::WindowManager& parWindowManager);
ReviewDialog();
void setPlayerName(const std::string &name);
void setRace(const std::string &raceId);

View file

@ -12,8 +12,8 @@
using namespace MWGui;
ScrollWindow::ScrollWindow (MWBase::WindowManager& parWindowManager)
: WindowBase("openmw_scroll.layout", parWindowManager)
ScrollWindow::ScrollWindow ()
: WindowBase("openmw_scroll.layout")
, mTakeButtonShow(true)
, mTakeButtonAllowed(true)
{

View file

@ -11,7 +11,7 @@ namespace MWGui
class ScrollWindow : public WindowBase
{
public:
ScrollWindow (MWBase::WindowManager& parWindowManager);
ScrollWindow ();
void open (MWWorld::Ptr scroll);
void setTakeButtonShow(bool show);

View file

@ -93,8 +93,8 @@ namespace
namespace MWGui
{
SettingsWindow::SettingsWindow(MWBase::WindowManager& parWindowManager) :
WindowBase("openmw_settings_window.layout", parWindowManager)
SettingsWindow::SettingsWindow() :
WindowBase("openmw_settings_window.layout")
{
getWidget(mOkButton, "OkButton");
getWidget(mSubtitlesButton, "SubtitlesButton");

View file

@ -13,7 +13,7 @@ namespace MWGui
class SettingsWindow : public WindowBase
{
public:
SettingsWindow(MWBase::WindowManager& parWindowManager);
SettingsWindow();
virtual void open();

View file

@ -23,8 +23,8 @@ namespace MWGui
{
const int SpellBuyingWindow::sLineHeight = 18;
SpellBuyingWindow::SpellBuyingWindow(MWBase::WindowManager& parWindowManager) :
WindowBase("openmw_spell_buying_window.layout", parWindowManager)
SpellBuyingWindow::SpellBuyingWindow() :
WindowBase("openmw_spell_buying_window.layout")
, mCurrentY(0)
, mLastPos(0)
{

View file

@ -21,7 +21,7 @@ namespace MWGui
class SpellBuyingWindow : public ReferenceInterface, public WindowBase
{
public:
SpellBuyingWindow(MWBase::WindowManager& parWindowManager);
SpellBuyingWindow();
void startSpellBuying(const MWWorld::Ptr& actor);

View file

@ -40,8 +40,8 @@ namespace
namespace MWGui
{
EditEffectDialog::EditEffectDialog(MWBase::WindowManager &parWindowManager)
: WindowModal("openmw_edit_effect.layout", parWindowManager)
EditEffectDialog::EditEffectDialog()
: WindowModal("openmw_edit_effect.layout")
, mEditing(false)
{
getWidget(mCancelButton, "CancelButton");
@ -274,9 +274,9 @@ namespace MWGui
// ------------------------------------------------------------------------------------------------
SpellCreationDialog::SpellCreationDialog(MWBase::WindowManager &parWindowManager)
: WindowBase("openmw_spellcreation_dialog.layout", parWindowManager)
, EffectEditorBase(parWindowManager)
SpellCreationDialog::SpellCreationDialog()
: WindowBase("openmw_spellcreation_dialog.layout")
, EffectEditorBase()
{
getWidget(mNameEdit, "NameEdit");
getWidget(mMagickaCost, "MagickaCost");
@ -412,8 +412,8 @@ namespace MWGui
// ------------------------------------------------------------------------------------------------
EffectEditorBase::EffectEditorBase(MWBase::WindowManager& parWindowManager)
: mAddEffectDialog(parWindowManager)
EffectEditorBase::EffectEditorBase()
: mAddEffectDialog()
, mSelectAttributeDialog(NULL)
, mSelectSkillDialog(NULL)
{
@ -541,7 +541,7 @@ namespace MWGui
if (effect->mData.mFlags & ESM::MagicEffect::TargetSkill)
{
delete mSelectSkillDialog;
mSelectSkillDialog = new SelectSkillDialog(*MWBase::Environment::get().getWindowManager ());
mSelectSkillDialog = new SelectSkillDialog();
mSelectSkillDialog->eventCancel += MyGUI::newDelegate(this, &SpellCreationDialog::onAttributeOrSkillCancel);
mSelectSkillDialog->eventItemSelected += MyGUI::newDelegate(this, &SpellCreationDialog::onSelectSkill);
mSelectSkillDialog->setVisible (true);
@ -549,7 +549,7 @@ namespace MWGui
else if (effect->mData.mFlags & ESM::MagicEffect::TargetAttribute)
{
delete mSelectAttributeDialog;
mSelectAttributeDialog = new SelectAttributeDialog(*MWBase::Environment::get().getWindowManager ());
mSelectAttributeDialog = new SelectAttributeDialog();
mSelectAttributeDialog->eventCancel += MyGUI::newDelegate(this, &SpellCreationDialog::onAttributeOrSkillCancel);
mSelectAttributeDialog->eventItemSelected += MyGUI::newDelegate(this, &SpellCreationDialog::onSelectAttribute);
mSelectAttributeDialog->setVisible (true);

View file

@ -15,7 +15,7 @@ namespace MWGui
class EditEffectDialog : public WindowModal
{
public:
EditEffectDialog(MWBase::WindowManager& parWindowManager);
EditEffectDialog();
virtual void open();
@ -83,7 +83,7 @@ namespace MWGui
class EffectEditorBase
{
public:
EffectEditorBase(MWBase::WindowManager& parWindowManager);
EffectEditorBase();
protected:
@ -123,7 +123,7 @@ namespace MWGui
class SpellCreationDialog : public WindowBase, public ReferenceInterface, public EffectEditorBase
{
public:
SpellCreationDialog(MWBase::WindowManager& parWindowManager);
SpellCreationDialog();
virtual void open();

View file

@ -47,8 +47,8 @@ namespace
namespace MWGui
{
SpellWindow::SpellWindow(MWBase::WindowManager& parWindowManager)
: WindowPinnableBase("openmw_spell_window.layout", parWindowManager)
SpellWindow::SpellWindow()
: WindowPinnableBase("openmw_spell_window.layout")
, mHeight(0)
, mWidth(0)
{

View file

@ -10,7 +10,7 @@ namespace MWGui
class SpellWindow : public WindowPinnableBase
{
public:
SpellWindow(MWBase::WindowManager& parWindowManager);
SpellWindow();
virtual ~SpellWindow();
void updateSpells();

View file

@ -22,8 +22,8 @@
using namespace MWGui;
const int StatsWindow::sLineHeight = 18;
StatsWindow::StatsWindow (MWBase::WindowManager& parWindowManager)
: WindowPinnableBase("openmw_stats_window.layout", parWindowManager)
StatsWindow::StatsWindow ()
: WindowPinnableBase("openmw_stats_window.layout")
, mSkillView(NULL)
, mClientHeight(0)
, mMajorSkills()

View file

@ -22,7 +22,7 @@ namespace MWGui
typedef std::vector<int> SkillList;
StatsWindow(MWBase::WindowManager& parWindowManager);
StatsWindow();
/// automatically updates all the data in the stats window, but only if it has changed.
void onFrame();

View file

@ -5,8 +5,8 @@
using namespace MWGui;
TextInputDialog::TextInputDialog(MWBase::WindowManager& parWindowManager)
: WindowModal("openmw_text_input.layout", parWindowManager)
TextInputDialog::TextInputDialog()
: WindowModal("openmw_text_input.layout")
{
// Centre dialog
center();

View file

@ -13,7 +13,7 @@ namespace MWGui
class TextInputDialog : public WindowModal
{
public:
TextInputDialog(MWBase::WindowManager& parWindowManager);
TextInputDialog();
std::string getTextInput() const { return mTextEdit ? mTextEdit->getOnlyText() : ""; }
void setTextInput(const std::string &text) { if (mTextEdit) mTextEdit->setOnlyText(text); }

View file

@ -19,7 +19,7 @@
using namespace MWGui;
using namespace MyGUI;
ToolTips::ToolTips(MWBase::WindowManager* windowManager) :
ToolTips::ToolTips() :
Layout("openmw_tooltips.layout")
, mGameMode(true)
, mFullHelp(false)

View file

@ -39,7 +39,7 @@ namespace MWGui
class ToolTips : public OEngine::GUI::Layout
{
public:
ToolTips(MWBase::WindowManager* windowManager);
ToolTips();
void onFrame(float frameDuration);

View file

@ -24,8 +24,8 @@ namespace MWGui
const float TradeWindow::sBalanceChangeInitialPause = 0.5;
const float TradeWindow::sBalanceChangeInterval = 0.1;
TradeWindow::TradeWindow(MWBase::WindowManager& parWindowManager) :
WindowBase("openmw_trade_window.layout", parWindowManager)
TradeWindow::TradeWindow() :
WindowBase("openmw_trade_window.layout")
, ContainerBase(NULL) // no drag&drop
, mCurrentBalance(0)
, mBalanceButtonsState(BBS_None)

View file

@ -23,7 +23,7 @@ namespace MWGui
class TradeWindow : public ContainerBase, public WindowBase
{
public:
TradeWindow(MWBase::WindowManager& parWindowManager);
TradeWindow();
void startTrade(MWWorld::Ptr actor);

View file

@ -20,8 +20,8 @@
namespace MWGui
{
TrainingWindow::TrainingWindow(MWBase::WindowManager &parWindowManager)
: WindowBase("openmw_trainingwindow.layout", parWindowManager)
TrainingWindow::TrainingWindow()
: WindowBase("openmw_trainingwindow.layout")
, mFadeTimeRemaining(0)
{
getWidget(mTrainingOptions, "TrainingOptions");

View file

@ -10,7 +10,7 @@ namespace MWGui
class TrainingWindow : public WindowBase, public ReferenceInterface
{
public:
TrainingWindow(MWBase::WindowManager& parWindowManager);
TrainingWindow();
virtual void open();

View file

@ -25,8 +25,8 @@ namespace MWGui
{
const int TravelWindow::sLineHeight = 18;
TravelWindow::TravelWindow(MWBase::WindowManager& parWindowManager) :
WindowBase("openmw_travel_window.layout", parWindowManager)
TravelWindow::TravelWindow() :
WindowBase("openmw_travel_window.layout")
, mCurrentY(0)
, mLastPos(0)
{

View file

@ -23,7 +23,7 @@ namespace MWGui
class TravelWindow : public ReferenceInterface, public WindowBase
{
public:
TravelWindow(MWBase::WindowManager& parWindowManager);
TravelWindow();
void startTravel(const MWWorld::Ptr& actor);

View file

@ -25,8 +25,8 @@
namespace MWGui
{
WaitDialogProgressBar::WaitDialogProgressBar(MWBase::WindowManager &parWindowManager)
: WindowBase("openmw_wait_dialog_progressbar.layout", parWindowManager)
WaitDialogProgressBar::WaitDialogProgressBar()
: WindowBase("openmw_wait_dialog_progressbar.layout")
{
getWidget(mProgressBar, "ProgressBar");
getWidget(mProgressText, "ProgressText");
@ -46,9 +46,9 @@ namespace MWGui
// ---------------------------------------------------------------------------------------------------------
WaitDialog::WaitDialog(MWBase::WindowManager &parWindowManager)
: WindowBase("openmw_wait_dialog.layout", parWindowManager)
, mProgressBar(parWindowManager)
WaitDialog::WaitDialog()
: WindowBase("openmw_wait_dialog.layout")
, mProgressBar()
, mWaiting(false)
, mSleeping(false)
, mHours(1)

View file

@ -9,7 +9,7 @@ namespace MWGui
class WaitDialogProgressBar : public WindowBase
{
public:
WaitDialogProgressBar(MWBase::WindowManager& parWindowManager);
WaitDialogProgressBar();
virtual void open();
@ -23,7 +23,7 @@ namespace MWGui
class WaitDialog : public WindowBase
{
public:
WaitDialog(MWBase::WindowManager& parWindowManager);
WaitDialog();
virtual void open();

View file

@ -34,8 +34,7 @@ void MWGui::Widgets::fixTexturePath(std::string &path)
/* MWSkill */
MWSkill::MWSkill()
: mManager(NULL)
, mSkillId(ESM::Skill::Length)
: mSkillId(ESM::Skill::Length)
, mSkillNameWidget(NULL)
, mSkillValueWidget(NULL)
{
@ -65,7 +64,7 @@ void MWSkill::setSkillValue(const SkillValue& value)
void MWSkill::updateWidgets()
{
if (mSkillNameWidget && mManager)
if (mSkillNameWidget)
{
if (mSkillId == ESM::Skill::Length)
{
@ -73,7 +72,7 @@ void MWSkill::updateWidgets()
}
else
{
const std::string &name = mManager->getGameSettingString(ESM::Skill::sSkillNameIds[mSkillId], "");
const std::string &name = MWBase::Environment::get().getWindowManager()->getGameSettingString(ESM::Skill::sSkillNameIds[mSkillId], "");
static_cast<MyGUI::TextBox*>(mSkillNameWidget)->setCaption(name);
}
}
@ -126,8 +125,7 @@ void MWSkill::initialiseOverride()
/* MWAttribute */
MWAttribute::MWAttribute()
: mManager(NULL)
, mId(-1)
: mId(-1)
, mAttributeNameWidget(NULL)
, mAttributeValueWidget(NULL)
{
@ -152,7 +150,7 @@ void MWAttribute::onClicked(MyGUI::Widget* _sender)
void MWAttribute::updateWidgets()
{
if (mAttributeNameWidget && mManager)
if (mAttributeNameWidget)
{
if (mId < 0 || mId >= 8)
{
@ -170,7 +168,7 @@ void MWAttribute::updateWidgets()
"sAttributePersonality",
"sAttributeLuck"
};
const std::string &name = mManager->getGameSettingString(attributes[mId], "");
const std::string &name = MWBase::Environment::get().getWindowManager()->getGameSettingString(attributes[mId], "");
static_cast<MyGUI::TextBox*>(mAttributeNameWidget)->setCaption(name);
}
}

View file

@ -98,7 +98,6 @@ namespace MWGui
void setSkillNumber(int skillId);
void setSkillValue(const SkillValue& value);
MWBase::WindowManager *getWindowManager() const { return mManager; }
ESM::Skill::SkillEnum getSkillId() const { return mSkillId; }
const SkillValue& getSkillValue() const { return mValue; }
@ -121,7 +120,6 @@ namespace MWGui
void updateWidgets();
MWBase::WindowManager *mManager;
ESM::Skill::SkillEnum mSkillId;
SkillValue mValue;
MyGUI::Widget* mSkillNameWidget;
@ -140,7 +138,6 @@ namespace MWGui
void setAttributeId(int attributeId);
void setAttributeValue(const AttributeValue& value);
MWBase::WindowManager *getWindowManager() const { return mManager; }
int getAttributeId() const { return mId; }
const AttributeValue& getAttributeValue() const { return mValue; }
@ -163,7 +160,6 @@ namespace MWGui
void updateWidgets();
MWBase::WindowManager *mManager;
int mId;
AttributeValue mValue;
MyGUI::Widget* mAttributeNameWidget;

View file

@ -6,7 +6,7 @@
using namespace MWGui;
WindowBase::WindowBase(const std::string& parLayout, MWBase::WindowManager& parWindowManager)
WindowBase::WindowBase(const std::string& parLayout)
: Layout(parLayout)
{
}
@ -38,8 +38,8 @@ void WindowBase::center()
mMainWidget->setCoord(coord);
}
WindowModal::WindowModal(const std::string& parLayout, MWBase::WindowManager& parWindowManager)
: WindowBase(parLayout, parWindowManager)
WindowModal::WindowModal(const std::string& parLayout)
: WindowBase(parLayout)
{
}

View file

@ -15,7 +15,7 @@ namespace MWGui
class WindowBase: public OEngine::GUI::Layout
{
public:
WindowBase(const std::string& parLayout, MWBase::WindowManager& parWindowManager);
WindowBase(const std::string& parLayout);
// Events
typedef MyGUI::delegates::CMultiDelegate1<WindowBase*> EventHandle_WindowBase;
@ -38,7 +38,7 @@ namespace MWGui
class WindowModal : public WindowBase
{
public:
WindowModal(const std::string& parLayout, MWBase::WindowManager& parWindowManager);
WindowModal(const std::string& parLayout);
virtual void open();
virtual void close();
};

View file

@ -162,38 +162,38 @@ WindowManager::WindowManager(
mDragAndDrop->mDragAndDropWidget = dragAndDropWidget;
mMenu = new MainMenu(w,h);
mMap = new MapWindow(*this, cacheDir);
mStatsWindow = new StatsWindow(*this);
mMap = new MapWindow(cacheDir);
mStatsWindow = new StatsWindow();
mConsole = new Console(w,h, consoleOnlyScripts);
mJournal = new JournalWindow(*this);
mMessageBoxManager = new MessageBoxManager(this);
mInventoryWindow = new InventoryWindow(*this,mDragAndDrop);
mTradeWindow = new TradeWindow(*this);
mSpellBuyingWindow = new SpellBuyingWindow(*this);
mTravelWindow = new TravelWindow(*this);
mDialogueWindow = new DialogueWindow(*this);
mContainerWindow = new ContainerWindow(*this,mDragAndDrop);
mJournal = new JournalWindow();
mMessageBoxManager = new MessageBoxManager();
mInventoryWindow = new InventoryWindow(mDragAndDrop);
mTradeWindow = new TradeWindow();
mSpellBuyingWindow = new SpellBuyingWindow();
mTravelWindow = new TravelWindow();
mDialogueWindow = new DialogueWindow();
mContainerWindow = new ContainerWindow(mDragAndDrop);
mHud = new HUD(w,h, mShowFPSLevel, mDragAndDrop);
mToolTips = new ToolTips(this);
mScrollWindow = new ScrollWindow(*this);
mBookWindow = new BookWindow(*this);
mCountDialog = new CountDialog(*this);
mSettingsWindow = new SettingsWindow(*this);
mConfirmationDialog = new ConfirmationDialog(*this);
mAlchemyWindow = new AlchemyWindow(*this);
mSpellWindow = new SpellWindow(*this);
mQuickKeysMenu = new QuickKeysMenu(*this);
mLevelupDialog = new LevelupDialog(*this);
mWaitDialog = new WaitDialog(*this);
mSpellCreationDialog = new SpellCreationDialog(*this);
mEnchantingDialog = new EnchantingDialog(*this);
mTrainingWindow = new TrainingWindow(*this);
mMerchantRepair = new MerchantRepair(*this);
mRepair = new Repair(*this);
mToolTips = new ToolTips();
mScrollWindow = new ScrollWindow();
mBookWindow = new BookWindow();
mCountDialog = new CountDialog();
mSettingsWindow = new SettingsWindow();
mConfirmationDialog = new ConfirmationDialog();
mAlchemyWindow = new AlchemyWindow();
mSpellWindow = new SpellWindow();
mQuickKeysMenu = new QuickKeysMenu();
mLevelupDialog = new LevelupDialog();
mWaitDialog = new WaitDialog();
mSpellCreationDialog = new SpellCreationDialog();
mEnchantingDialog = new EnchantingDialog();
mTrainingWindow = new TrainingWindow();
mMerchantRepair = new MerchantRepair();
mRepair = new Repair();
mSoulgemDialog = new SoulgemDialog(mMessageBoxManager);
mCompanionWindow = new CompanionWindow(*this, mDragAndDrop, mMessageBoxManager);
mCompanionWindow = new CompanionWindow(mDragAndDrop, mMessageBoxManager);
mLoadingScreen = new LoadingScreen(mRendering->getScene (), mRendering->getWindow (), *this);
mLoadingScreen = new LoadingScreen(mRendering->getScene (), mRendering->getWindow ());
mLoadingScreen->onResChange (w,h);
mInputBlocker = mGui->createWidget<MyGUI::Widget>("",0,0,w,h,MyGUI::Align::Default,"Windows","");
@ -202,7 +202,7 @@ WindowManager::WindowManager(
mHud->setVisible(mHudEnabled);
mCharGen = new CharacterCreation(this);
mCharGen = new CharacterCreation();
// Setup player stats
for (int i = 0; i < ESM::Attribute::Length; ++i)

View file

@ -6,8 +6,8 @@
using namespace MWGui;
WindowPinnableBase::WindowPinnableBase(const std::string& parLayout, MWBase::WindowManager& parWindowManager)
: WindowBase(parLayout, parWindowManager), mPinned(false), mVisible(false)
WindowPinnableBase::WindowPinnableBase(const std::string& parLayout)
: WindowBase(parLayout), mPinned(false), mVisible(false)
{
ExposedWindow* window = static_cast<ExposedWindow*>(mMainWidget);
mPinButton = window->getSkinWidget ("Button");

View file

@ -10,7 +10,7 @@ namespace MWGui
class WindowPinnableBase: public WindowBase
{
public:
WindowPinnableBase(const std::string& parLayout, MWBase::WindowManager& parWindowManager);
WindowPinnableBase(const std::string& parLayout);
bool pinned() { return mPinned; }
private: