mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 02:53:51 +00:00
Finally eliminated calls to MWBase::WindowManager in constructors
This commit is contained in:
parent
d768f6b57e
commit
f7383905b7
77 changed files with 300 additions and 309 deletions
|
@ -26,8 +26,8 @@ namespace
|
||||||
|
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
AlchemyWindow::AlchemyWindow(MWBase::WindowManager& parWindowManager)
|
AlchemyWindow::AlchemyWindow()
|
||||||
: WindowBase("openmw_alchemy_window.layout", parWindowManager)
|
: WindowBase("openmw_alchemy_window.layout")
|
||||||
, ContainerBase(0), mApparatus (4), mIngredients (4)
|
, ContainerBase(0), mApparatus (4), mIngredients (4)
|
||||||
{
|
{
|
||||||
getWidget(mCreateButton, "CreateButton");
|
getWidget(mCreateButton, "CreateButton");
|
||||||
|
|
|
@ -14,7 +14,7 @@ namespace MWGui
|
||||||
class AlchemyWindow : public WindowBase, public ContainerBase
|
class AlchemyWindow : public WindowBase, public ContainerBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AlchemyWindow(MWBase::WindowManager& parWindowManager);
|
AlchemyWindow();
|
||||||
|
|
||||||
virtual void open();
|
virtual void open();
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,8 @@ bool sortBirthSigns(const std::pair<std::string, const ESM::BirthSign*>& left, c
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BirthDialog::BirthDialog(MWBase::WindowManager& parWindowManager)
|
BirthDialog::BirthDialog()
|
||||||
: WindowModal("openmw_chargen_birth.layout", parWindowManager)
|
: WindowModal("openmw_chargen_birth.layout")
|
||||||
{
|
{
|
||||||
// Centre dialog
|
// Centre dialog
|
||||||
center();
|
center();
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace MWGui
|
||||||
class BirthDialog : public WindowModal
|
class BirthDialog : public WindowModal
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BirthDialog(MWBase::WindowManager& parWindowManager);
|
BirthDialog();
|
||||||
|
|
||||||
enum Gender
|
enum Gender
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
|
|
||||||
using namespace MWGui;
|
using namespace MWGui;
|
||||||
|
|
||||||
BookWindow::BookWindow (MWBase::WindowManager& parWindowManager)
|
BookWindow::BookWindow ()
|
||||||
: WindowBase("openmw_book.layout", parWindowManager)
|
: WindowBase("openmw_book.layout")
|
||||||
, mTakeButtonShow(true)
|
, mTakeButtonShow(true)
|
||||||
, mTakeButtonAllowed(true)
|
, mTakeButtonAllowed(true)
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,7 +12,7 @@ namespace MWGui
|
||||||
class BookWindow : public WindowBase
|
class BookWindow : public WindowBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BookWindow(MWBase::WindowManager& parWindowManager);
|
BookWindow();
|
||||||
|
|
||||||
void open(MWWorld::Ptr book);
|
void open(MWWorld::Ptr book);
|
||||||
void setTakeButtonShow(bool show);
|
void setTakeButtonShow(bool show);
|
||||||
|
|
|
@ -47,7 +47,7 @@ namespace
|
||||||
|
|
||||||
using namespace MWGui;
|
using namespace MWGui;
|
||||||
|
|
||||||
CharacterCreation::CharacterCreation(MWBase::WindowManager* _wm)
|
CharacterCreation::CharacterCreation()
|
||||||
: mNameDialog(0)
|
: mNameDialog(0)
|
||||||
, mRaceDialog(0)
|
, mRaceDialog(0)
|
||||||
, mClassChoiceDialog(0)
|
, mClassChoiceDialog(0)
|
||||||
|
@ -58,7 +58,6 @@ CharacterCreation::CharacterCreation(MWBase::WindowManager* _wm)
|
||||||
, mBirthSignDialog(0)
|
, mBirthSignDialog(0)
|
||||||
, mReviewDialog(0)
|
, mReviewDialog(0)
|
||||||
, mGenerateClassStep(0)
|
, mGenerateClassStep(0)
|
||||||
, mWM(_wm)
|
|
||||||
{
|
{
|
||||||
mCreationStage = CSE_NotStarted;
|
mCreationStage = CSE_NotStarted;
|
||||||
}
|
}
|
||||||
|
@ -118,10 +117,10 @@ void CharacterCreation::spawnDialog(const char id)
|
||||||
switch (id)
|
switch (id)
|
||||||
{
|
{
|
||||||
case GM_Name:
|
case GM_Name:
|
||||||
mWM->removeDialog(mNameDialog);
|
MWBase::Environment::get().getWindowManager()->removeDialog(mNameDialog);
|
||||||
mNameDialog = 0;
|
mNameDialog = 0;
|
||||||
mNameDialog = new TextInputDialog(*mWM);
|
mNameDialog = new TextInputDialog();
|
||||||
mNameDialog->setTextLabel(mWM->getGameSettingString("sName", "Name"));
|
mNameDialog->setTextLabel(MWBase::Environment::get().getWindowManager()->getGameSettingString("sName", "Name"));
|
||||||
mNameDialog->setTextInput(mPlayerName);
|
mNameDialog->setTextInput(mPlayerName);
|
||||||
mNameDialog->setNextButtonShow(mCreationStage >= CSE_NameChosen);
|
mNameDialog->setNextButtonShow(mCreationStage >= CSE_NameChosen);
|
||||||
mNameDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onNameDialogDone);
|
mNameDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onNameDialogDone);
|
||||||
|
@ -129,9 +128,9 @@ void CharacterCreation::spawnDialog(const char id)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GM_Race:
|
case GM_Race:
|
||||||
mWM->removeDialog(mRaceDialog);
|
MWBase::Environment::get().getWindowManager()->removeDialog(mRaceDialog);
|
||||||
mRaceDialog = 0;
|
mRaceDialog = 0;
|
||||||
mRaceDialog = new RaceDialog(*mWM);
|
mRaceDialog = new RaceDialog();
|
||||||
mRaceDialog->setNextButtonShow(mCreationStage >= CSE_RaceChosen);
|
mRaceDialog->setNextButtonShow(mCreationStage >= CSE_RaceChosen);
|
||||||
mRaceDialog->setRaceId(mPlayerRaceId);
|
mRaceDialog->setRaceId(mPlayerRaceId);
|
||||||
mRaceDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onRaceDialogDone);
|
mRaceDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onRaceDialogDone);
|
||||||
|
@ -142,9 +141,9 @@ void CharacterCreation::spawnDialog(const char id)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GM_Class:
|
case GM_Class:
|
||||||
mWM->removeDialog(mClassChoiceDialog);
|
MWBase::Environment::get().getWindowManager()->removeDialog(mClassChoiceDialog);
|
||||||
mClassChoiceDialog = 0;
|
mClassChoiceDialog = 0;
|
||||||
mClassChoiceDialog = new ClassChoiceDialog(*mWM);
|
mClassChoiceDialog = new ClassChoiceDialog();
|
||||||
mClassChoiceDialog->eventButtonSelected += MyGUI::newDelegate(this, &CharacterCreation::onClassChoice);
|
mClassChoiceDialog->eventButtonSelected += MyGUI::newDelegate(this, &CharacterCreation::onClassChoice);
|
||||||
mClassChoiceDialog->setVisible(true);
|
mClassChoiceDialog->setVisible(true);
|
||||||
if (mCreationStage < CSE_RaceChosen)
|
if (mCreationStage < CSE_RaceChosen)
|
||||||
|
@ -152,9 +151,9 @@ void CharacterCreation::spawnDialog(const char id)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GM_ClassPick:
|
case GM_ClassPick:
|
||||||
mWM->removeDialog(mPickClassDialog);
|
MWBase::Environment::get().getWindowManager()->removeDialog(mPickClassDialog);
|
||||||
mPickClassDialog = 0;
|
mPickClassDialog = 0;
|
||||||
mPickClassDialog = new PickClassDialog(*mWM);
|
mPickClassDialog = new PickClassDialog();
|
||||||
mPickClassDialog->setNextButtonShow(mCreationStage >= CSE_ClassChosen);
|
mPickClassDialog->setNextButtonShow(mCreationStage >= CSE_ClassChosen);
|
||||||
mPickClassDialog->setClassId(mPlayerClass.mName);
|
mPickClassDialog->setClassId(mPlayerClass.mName);
|
||||||
mPickClassDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onPickClassDialogDone);
|
mPickClassDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onPickClassDialogDone);
|
||||||
|
@ -165,9 +164,9 @@ void CharacterCreation::spawnDialog(const char id)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GM_Birth:
|
case GM_Birth:
|
||||||
mWM->removeDialog(mBirthSignDialog);
|
MWBase::Environment::get().getWindowManager()->removeDialog(mBirthSignDialog);
|
||||||
mBirthSignDialog = 0;
|
mBirthSignDialog = 0;
|
||||||
mBirthSignDialog = new BirthDialog(*mWM);
|
mBirthSignDialog = new BirthDialog();
|
||||||
mBirthSignDialog->setNextButtonShow(mCreationStage >= CSE_BirthSignChosen);
|
mBirthSignDialog->setNextButtonShow(mCreationStage >= CSE_BirthSignChosen);
|
||||||
mBirthSignDialog->setBirthId(mPlayerBirthSignId);
|
mBirthSignDialog->setBirthId(mPlayerBirthSignId);
|
||||||
mBirthSignDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onBirthSignDialogDone);
|
mBirthSignDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onBirthSignDialogDone);
|
||||||
|
@ -178,9 +177,9 @@ void CharacterCreation::spawnDialog(const char id)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GM_ClassCreate:
|
case GM_ClassCreate:
|
||||||
mWM->removeDialog(mCreateClassDialog);
|
MWBase::Environment::get().getWindowManager()->removeDialog(mCreateClassDialog);
|
||||||
mCreateClassDialog = 0;
|
mCreateClassDialog = 0;
|
||||||
mCreateClassDialog = new CreateClassDialog(*mWM);
|
mCreateClassDialog = new CreateClassDialog();
|
||||||
mCreateClassDialog->setNextButtonShow(mCreationStage >= CSE_ClassChosen);
|
mCreateClassDialog->setNextButtonShow(mCreationStage >= CSE_ClassChosen);
|
||||||
mCreateClassDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onCreateClassDialogDone);
|
mCreateClassDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onCreateClassDialogDone);
|
||||||
mCreateClassDialog->eventBack += MyGUI::newDelegate(this, &CharacterCreation::onCreateClassDialogBack);
|
mCreateClassDialog->eventBack += MyGUI::newDelegate(this, &CharacterCreation::onCreateClassDialogBack);
|
||||||
|
@ -199,9 +198,9 @@ void CharacterCreation::spawnDialog(const char id)
|
||||||
mCreationStage = CSE_RaceChosen;
|
mCreationStage = CSE_RaceChosen;
|
||||||
break;
|
break;
|
||||||
case GM_Review:
|
case GM_Review:
|
||||||
mWM->removeDialog(mReviewDialog);
|
MWBase::Environment::get().getWindowManager()->removeDialog(mReviewDialog);
|
||||||
mReviewDialog = 0;
|
mReviewDialog = 0;
|
||||||
mReviewDialog = new ReviewDialog(*mWM);
|
mReviewDialog = new ReviewDialog();
|
||||||
mReviewDialog->setPlayerName(mPlayerName);
|
mReviewDialog->setPlayerName(mPlayerName);
|
||||||
mReviewDialog->setRace(mPlayerRaceId);
|
mReviewDialog->setRace(mPlayerRaceId);
|
||||||
mReviewDialog->setClass(mPlayerClass);
|
mReviewDialog->setClass(mPlayerClass);
|
||||||
|
@ -212,7 +211,7 @@ void CharacterCreation::spawnDialog(const char id)
|
||||||
mReviewDialog->setFatigue(mPlayerFatigue);
|
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();
|
for (std::map<int, MWMechanics::Stat<int> >::iterator it = attributes.begin();
|
||||||
it != attributes.end(); ++it)
|
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();
|
for (std::map<int, MWMechanics::Stat<float> >::iterator it = skills.begin();
|
||||||
it != skills.end(); ++it)
|
it != skills.end(); ++it)
|
||||||
{
|
{
|
||||||
mReviewDialog->setSkillValue(static_cast<ESM::Skill::SkillEnum> (it->first), it->second);
|
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);
|
mReviewDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onReviewDialogDone);
|
||||||
|
@ -257,41 +256,41 @@ void CharacterCreation::setPlayerFatigue (const MWMechanics::DynamicStat<float>&
|
||||||
|
|
||||||
void CharacterCreation::onReviewDialogDone(WindowBase* parWindow)
|
void CharacterCreation::onReviewDialogDone(WindowBase* parWindow)
|
||||||
{
|
{
|
||||||
mWM->removeDialog(mReviewDialog);
|
MWBase::Environment::get().getWindowManager()->removeDialog(mReviewDialog);
|
||||||
mReviewDialog = 0;
|
mReviewDialog = 0;
|
||||||
|
|
||||||
mWM->popGuiMode();
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CharacterCreation::onReviewDialogBack()
|
void CharacterCreation::onReviewDialogBack()
|
||||||
{
|
{
|
||||||
mWM->removeDialog(mReviewDialog);
|
MWBase::Environment::get().getWindowManager()->removeDialog(mReviewDialog);
|
||||||
mReviewDialog = 0;
|
mReviewDialog = 0;
|
||||||
|
|
||||||
mWM->pushGuiMode(GM_Birth);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Birth);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CharacterCreation::onReviewActivateDialog(int parDialog)
|
void CharacterCreation::onReviewActivateDialog(int parDialog)
|
||||||
{
|
{
|
||||||
mWM->removeDialog(mReviewDialog);
|
MWBase::Environment::get().getWindowManager()->removeDialog(mReviewDialog);
|
||||||
mReviewDialog = 0;
|
mReviewDialog = 0;
|
||||||
mCreationStage = CSE_ReviewNext;
|
mCreationStage = CSE_ReviewNext;
|
||||||
|
|
||||||
mWM->popGuiMode();
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||||
|
|
||||||
switch(parDialog)
|
switch(parDialog)
|
||||||
{
|
{
|
||||||
case ReviewDialog::NAME_DIALOG:
|
case ReviewDialog::NAME_DIALOG:
|
||||||
mWM->pushGuiMode(GM_Name);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Name);
|
||||||
break;
|
break;
|
||||||
case ReviewDialog::RACE_DIALOG:
|
case ReviewDialog::RACE_DIALOG:
|
||||||
mWM->pushGuiMode(GM_Race);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Race);
|
||||||
break;
|
break;
|
||||||
case ReviewDialog::CLASS_DIALOG:
|
case ReviewDialog::CLASS_DIALOG:
|
||||||
mWM->pushGuiMode(GM_Class);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Class);
|
||||||
break;
|
break;
|
||||||
case ReviewDialog::BIRTHSIGN_DIALOG:
|
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)
|
if (klass)
|
||||||
{
|
{
|
||||||
mPlayerClass = *klass;
|
mPlayerClass = *klass;
|
||||||
mWM->setPlayerClass(mPlayerClass);
|
MWBase::Environment::get().getWindowManager()->setPlayerClass(mPlayerClass);
|
||||||
}
|
}
|
||||||
mWM->removeDialog(mPickClassDialog);
|
MWBase::Environment::get().getWindowManager()->removeDialog(mPickClassDialog);
|
||||||
mPickClassDialog = 0;
|
mPickClassDialog = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO This bit gets repeated a few times; wrap it in a function
|
//TODO This bit gets repeated a few times; wrap it in a function
|
||||||
if (mCreationStage == CSE_ReviewNext)
|
if (mCreationStage == CSE_ReviewNext)
|
||||||
{
|
{
|
||||||
mWM->popGuiMode();
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||||
mWM->pushGuiMode(GM_Review);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Review);
|
||||||
}
|
}
|
||||||
else if (mCreationStage >= CSE_ClassChosen)
|
else if (mCreationStage >= CSE_ClassChosen)
|
||||||
{
|
{
|
||||||
mWM->popGuiMode();
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||||
mWM->pushGuiMode(GM_Birth);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Birth);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mCreationStage = CSE_ClassChosen;
|
mCreationStage = CSE_ClassChosen;
|
||||||
mWM->popGuiMode();
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -339,34 +338,34 @@ void CharacterCreation::onPickClassDialogBack()
|
||||||
const std::string classId = mPickClassDialog->getClassId();
|
const std::string classId = mPickClassDialog->getClassId();
|
||||||
if (!classId.empty())
|
if (!classId.empty())
|
||||||
MWBase::Environment::get().getMechanicsManager()->setPlayerClass(classId);
|
MWBase::Environment::get().getMechanicsManager()->setPlayerClass(classId);
|
||||||
mWM->removeDialog(mPickClassDialog);
|
MWBase::Environment::get().getWindowManager()->removeDialog(mPickClassDialog);
|
||||||
mPickClassDialog = 0;
|
mPickClassDialog = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
mWM->popGuiMode();
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||||
mWM->pushGuiMode(GM_Class);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Class);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CharacterCreation::onClassChoice(int _index)
|
void CharacterCreation::onClassChoice(int _index)
|
||||||
{
|
{
|
||||||
mWM->removeDialog(mClassChoiceDialog);
|
MWBase::Environment::get().getWindowManager()->removeDialog(mClassChoiceDialog);
|
||||||
mClassChoiceDialog = 0;
|
mClassChoiceDialog = 0;
|
||||||
|
|
||||||
mWM->popGuiMode();
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||||
|
|
||||||
switch(_index)
|
switch(_index)
|
||||||
{
|
{
|
||||||
case ClassChoiceDialog::Class_Generate:
|
case ClassChoiceDialog::Class_Generate:
|
||||||
mWM->pushGuiMode(GM_ClassGenerate);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_ClassGenerate);
|
||||||
break;
|
break;
|
||||||
case ClassChoiceDialog::Class_Pick:
|
case ClassChoiceDialog::Class_Pick:
|
||||||
mWM->pushGuiMode(GM_ClassPick);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_ClassPick);
|
||||||
break;
|
break;
|
||||||
case ClassChoiceDialog::Class_Create:
|
case ClassChoiceDialog::Class_Create:
|
||||||
mWM->pushGuiMode(GM_ClassCreate);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_ClassCreate);
|
||||||
break;
|
break;
|
||||||
case ClassChoiceDialog::Class_Back:
|
case ClassChoiceDialog::Class_Back:
|
||||||
mWM->pushGuiMode(GM_Race);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Race);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -377,26 +376,26 @@ void CharacterCreation::onNameDialogDone(WindowBase* parWindow)
|
||||||
if (mNameDialog)
|
if (mNameDialog)
|
||||||
{
|
{
|
||||||
mPlayerName = mNameDialog->getTextInput();
|
mPlayerName = mNameDialog->getTextInput();
|
||||||
mWM->setValue("name", mPlayerName);
|
MWBase::Environment::get().getWindowManager()->setValue("name", mPlayerName);
|
||||||
MWBase::Environment::get().getMechanicsManager()->setPlayerName(mPlayerName);
|
MWBase::Environment::get().getMechanicsManager()->setPlayerName(mPlayerName);
|
||||||
mWM->removeDialog(mNameDialog);
|
MWBase::Environment::get().getWindowManager()->removeDialog(mNameDialog);
|
||||||
mNameDialog = 0;
|
mNameDialog = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mCreationStage == CSE_ReviewNext)
|
if (mCreationStage == CSE_ReviewNext)
|
||||||
{
|
{
|
||||||
mWM->popGuiMode();
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||||
mWM->pushGuiMode(GM_Review);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Review);
|
||||||
}
|
}
|
||||||
else if (mCreationStage >= CSE_NameChosen)
|
else if (mCreationStage >= CSE_NameChosen)
|
||||||
{
|
{
|
||||||
mWM->popGuiMode();
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||||
mWM->pushGuiMode(GM_Race);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Race);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mCreationStage = CSE_NameChosen;
|
mCreationStage = CSE_NameChosen;
|
||||||
mWM->popGuiMode();
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -414,12 +413,12 @@ void CharacterCreation::onRaceDialogBack()
|
||||||
data.mHair
|
data.mHair
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
mWM->removeDialog(mRaceDialog);
|
MWBase::Environment::get().getWindowManager()->removeDialog(mRaceDialog);
|
||||||
mRaceDialog = 0;
|
mRaceDialog = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
mWM->popGuiMode();
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||||
mWM->pushGuiMode(GM_Name);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CharacterCreation::onRaceDialogDone(WindowBase* parWindow)
|
void CharacterCreation::onRaceDialogDone(WindowBase* parWindow)
|
||||||
|
@ -436,26 +435,26 @@ void CharacterCreation::onRaceDialogDone(WindowBase* parWindow)
|
||||||
data.mHair
|
data.mHair
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
mWM->getInventoryWindow()->rebuildAvatar();
|
MWBase::Environment::get().getWindowManager()->getInventoryWindow()->rebuildAvatar();
|
||||||
|
|
||||||
mWM->removeDialog(mRaceDialog);
|
MWBase::Environment::get().getWindowManager()->removeDialog(mRaceDialog);
|
||||||
mRaceDialog = 0;
|
mRaceDialog = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mCreationStage == CSE_ReviewNext)
|
if (mCreationStage == CSE_ReviewNext)
|
||||||
{
|
{
|
||||||
mWM->popGuiMode();
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||||
mWM->pushGuiMode(GM_Review);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Review);
|
||||||
}
|
}
|
||||||
else if (mCreationStage >= CSE_RaceChosen)
|
else if (mCreationStage >= CSE_RaceChosen)
|
||||||
{
|
{
|
||||||
mWM->popGuiMode();
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||||
mWM->pushGuiMode(GM_Class);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Class);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mCreationStage = CSE_RaceChosen;
|
mCreationStage = CSE_RaceChosen;
|
||||||
mWM->popGuiMode();
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -466,19 +465,19 @@ void CharacterCreation::onBirthSignDialogDone(WindowBase* parWindow)
|
||||||
mPlayerBirthSignId = mBirthSignDialog->getBirthId();
|
mPlayerBirthSignId = mBirthSignDialog->getBirthId();
|
||||||
if (!mPlayerBirthSignId.empty())
|
if (!mPlayerBirthSignId.empty())
|
||||||
MWBase::Environment::get().getMechanicsManager()->setPlayerBirthsign(mPlayerBirthSignId);
|
MWBase::Environment::get().getMechanicsManager()->setPlayerBirthsign(mPlayerBirthSignId);
|
||||||
mWM->removeDialog(mBirthSignDialog);
|
MWBase::Environment::get().getWindowManager()->removeDialog(mBirthSignDialog);
|
||||||
mBirthSignDialog = 0;
|
mBirthSignDialog = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mCreationStage >= CSE_BirthSignChosen)
|
if (mCreationStage >= CSE_BirthSignChosen)
|
||||||
{
|
{
|
||||||
mWM->popGuiMode();
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||||
mWM->pushGuiMode(GM_Review);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Review);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mCreationStage = CSE_BirthSignChosen;
|
mCreationStage = CSE_BirthSignChosen;
|
||||||
mWM->popGuiMode();
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -487,12 +486,12 @@ void CharacterCreation::onBirthSignDialogBack()
|
||||||
if (mBirthSignDialog)
|
if (mBirthSignDialog)
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getMechanicsManager()->setPlayerBirthsign(mBirthSignDialog->getBirthId());
|
MWBase::Environment::get().getMechanicsManager()->setPlayerBirthsign(mBirthSignDialog->getBirthId());
|
||||||
mWM->removeDialog(mBirthSignDialog);
|
MWBase::Environment::get().getWindowManager()->removeDialog(mBirthSignDialog);
|
||||||
mBirthSignDialog = 0;
|
mBirthSignDialog = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
mWM->popGuiMode();
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||||
mWM->pushGuiMode(GM_Class);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Class);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CharacterCreation::onCreateClassDialogDone(WindowBase* parWindow)
|
void CharacterCreation::onCreateClassDialogDone(WindowBase* parWindow)
|
||||||
|
@ -522,49 +521,49 @@ void CharacterCreation::onCreateClassDialogDone(WindowBase* parWindow)
|
||||||
|
|
||||||
MWBase::Environment::get().getMechanicsManager()->setPlayerClass(klass);
|
MWBase::Environment::get().getMechanicsManager()->setPlayerClass(klass);
|
||||||
mPlayerClass = klass;
|
mPlayerClass = klass;
|
||||||
mWM->setPlayerClass(klass);
|
MWBase::Environment::get().getWindowManager()->setPlayerClass(klass);
|
||||||
|
|
||||||
mWM->removeDialog(mCreateClassDialog);
|
MWBase::Environment::get().getWindowManager()->removeDialog(mCreateClassDialog);
|
||||||
mCreateClassDialog = 0;
|
mCreateClassDialog = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mCreationStage == CSE_ReviewNext)
|
if (mCreationStage == CSE_ReviewNext)
|
||||||
{
|
{
|
||||||
mWM->popGuiMode();
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||||
mWM->pushGuiMode(GM_Review);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Review);
|
||||||
}
|
}
|
||||||
else if (mCreationStage >= CSE_ClassChosen)
|
else if (mCreationStage >= CSE_ClassChosen)
|
||||||
{
|
{
|
||||||
mWM->popGuiMode();
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||||
mWM->pushGuiMode(GM_Birth);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Birth);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mCreationStage = CSE_ClassChosen;
|
mCreationStage = CSE_ClassChosen;
|
||||||
mWM->popGuiMode();
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CharacterCreation::onCreateClassDialogBack()
|
void CharacterCreation::onCreateClassDialogBack()
|
||||||
{
|
{
|
||||||
mWM->removeDialog(mCreateClassDialog);
|
MWBase::Environment::get().getWindowManager()->removeDialog(mCreateClassDialog);
|
||||||
mCreateClassDialog = 0;
|
mCreateClassDialog = 0;
|
||||||
|
|
||||||
mWM->popGuiMode();
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||||
mWM->pushGuiMode(GM_Class);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Class);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CharacterCreation::onClassQuestionChosen(int _index)
|
void CharacterCreation::onClassQuestionChosen(int _index)
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getSoundManager()->stopSay();
|
MWBase::Environment::get().getSoundManager()->stopSay();
|
||||||
|
|
||||||
mWM->removeDialog(mGenerateClassQuestionDialog);
|
MWBase::Environment::get().getWindowManager()->removeDialog(mGenerateClassQuestionDialog);
|
||||||
mGenerateClassQuestionDialog = 0;
|
mGenerateClassQuestionDialog = 0;
|
||||||
|
|
||||||
if (_index < 0 || _index >= 3)
|
if (_index < 0 || _index >= 3)
|
||||||
{
|
{
|
||||||
mWM->popGuiMode();
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||||
mWM->pushGuiMode(GM_Class);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Class);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -637,10 +636,10 @@ void CharacterCreation::showClassQuestionDialog()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mWM->removeDialog(mGenerateClassResultDialog);
|
MWBase::Environment::get().getWindowManager()->removeDialog(mGenerateClassResultDialog);
|
||||||
mGenerateClassResultDialog = 0;
|
mGenerateClassResultDialog = 0;
|
||||||
|
|
||||||
mGenerateClassResultDialog = new GenerateClassResultDialog(*mWM);
|
mGenerateClassResultDialog = new GenerateClassResultDialog();
|
||||||
mGenerateClassResultDialog->setClassId(mGenerateClass);
|
mGenerateClassResultDialog->setClassId(mGenerateClass);
|
||||||
mGenerateClassResultDialog->eventBack += MyGUI::newDelegate(this, &CharacterCreation::onGenerateClassBack);
|
mGenerateClassResultDialog->eventBack += MyGUI::newDelegate(this, &CharacterCreation::onGenerateClassBack);
|
||||||
mGenerateClassResultDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onGenerateClassDone);
|
mGenerateClassResultDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onGenerateClassDone);
|
||||||
|
@ -650,15 +649,15 @@ void CharacterCreation::showClassQuestionDialog()
|
||||||
|
|
||||||
if (mGenerateClassStep > 10)
|
if (mGenerateClassStep > 10)
|
||||||
{
|
{
|
||||||
mWM->popGuiMode();
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||||
mWM->pushGuiMode(GM_Class);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Class);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mWM->removeDialog(mGenerateClassQuestionDialog);
|
MWBase::Environment::get().getWindowManager()->removeDialog(mGenerateClassQuestionDialog);
|
||||||
mGenerateClassQuestionDialog = 0;
|
mGenerateClassQuestionDialog = 0;
|
||||||
|
|
||||||
mGenerateClassQuestionDialog = new InfoBoxDialog(*mWM);
|
mGenerateClassQuestionDialog = new InfoBoxDialog();
|
||||||
|
|
||||||
InfoBoxDialog::ButtonList buttons;
|
InfoBoxDialog::ButtonList buttons;
|
||||||
mGenerateClassQuestionDialog->setText(sGenerateClassSteps(mGenerateClassStep).mText);
|
mGenerateClassQuestionDialog->setText(sGenerateClassSteps(mGenerateClassStep).mText);
|
||||||
|
@ -674,18 +673,18 @@ void CharacterCreation::showClassQuestionDialog()
|
||||||
|
|
||||||
void CharacterCreation::onGenerateClassBack()
|
void CharacterCreation::onGenerateClassBack()
|
||||||
{
|
{
|
||||||
mWM->removeDialog(mGenerateClassResultDialog);
|
MWBase::Environment::get().getWindowManager()->removeDialog(mGenerateClassResultDialog);
|
||||||
mGenerateClassResultDialog = 0;
|
mGenerateClassResultDialog = 0;
|
||||||
|
|
||||||
MWBase::Environment::get().getMechanicsManager()->setPlayerClass(mGenerateClass);
|
MWBase::Environment::get().getMechanicsManager()->setPlayerClass(mGenerateClass);
|
||||||
|
|
||||||
mWM->popGuiMode();
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||||
mWM->pushGuiMode(GM_Class);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Class);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CharacterCreation::onGenerateClassDone(WindowBase* parWindow)
|
void CharacterCreation::onGenerateClassDone(WindowBase* parWindow)
|
||||||
{
|
{
|
||||||
mWM->removeDialog(mGenerateClassResultDialog);
|
MWBase::Environment::get().getWindowManager()->removeDialog(mGenerateClassResultDialog);
|
||||||
mGenerateClassResultDialog = 0;
|
mGenerateClassResultDialog = 0;
|
||||||
|
|
||||||
MWBase::Environment::get().getMechanicsManager()->setPlayerClass(mGenerateClass);
|
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);
|
MWBase::Environment::get().getWorld()->getStore().get<ESM::Class>().find(mGenerateClass);
|
||||||
|
|
||||||
mPlayerClass = *klass;
|
mPlayerClass = *klass;
|
||||||
mWM->setPlayerClass(mPlayerClass);
|
MWBase::Environment::get().getWindowManager()->setPlayerClass(mPlayerClass);
|
||||||
|
|
||||||
if (mCreationStage == CSE_ReviewNext)
|
if (mCreationStage == CSE_ReviewNext)
|
||||||
{
|
{
|
||||||
mWM->popGuiMode();
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||||
mWM->pushGuiMode(GM_Review);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Review);
|
||||||
}
|
}
|
||||||
else if (mCreationStage >= CSE_ClassChosen)
|
else if (mCreationStage >= CSE_ClassChosen)
|
||||||
{
|
{
|
||||||
mWM->popGuiMode();
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||||
mWM->pushGuiMode(GM_Birth);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_Birth);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mCreationStage = CSE_ClassChosen;
|
mCreationStage = CSE_ClassChosen;
|
||||||
mWM->popGuiMode();
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ namespace MWGui
|
||||||
public:
|
public:
|
||||||
typedef std::vector<int> SkillList;
|
typedef std::vector<int> SkillList;
|
||||||
|
|
||||||
CharacterCreation(MWBase::WindowManager* _wm);
|
CharacterCreation();
|
||||||
~CharacterCreation();
|
~CharacterCreation();
|
||||||
|
|
||||||
//Show a dialog
|
//Show a dialog
|
||||||
|
@ -58,8 +58,6 @@ namespace MWGui
|
||||||
BirthDialog* mBirthSignDialog;
|
BirthDialog* mBirthSignDialog;
|
||||||
ReviewDialog* mReviewDialog;
|
ReviewDialog* mReviewDialog;
|
||||||
|
|
||||||
MWBase::WindowManager* mWM;
|
|
||||||
|
|
||||||
//Player data
|
//Player data
|
||||||
std::string mPlayerName;
|
std::string mPlayerName;
|
||||||
std::string mPlayerRaceId;
|
std::string mPlayerRaceId;
|
||||||
|
|
|
@ -20,8 +20,8 @@ using namespace MWGui;
|
||||||
|
|
||||||
/* GenerateClassResultDialog */
|
/* GenerateClassResultDialog */
|
||||||
|
|
||||||
GenerateClassResultDialog::GenerateClassResultDialog(MWBase::WindowManager& parWindowManager)
|
GenerateClassResultDialog::GenerateClassResultDialog()
|
||||||
: WindowModal("openmw_chargen_generate_class_result.layout", parWindowManager)
|
: WindowModal("openmw_chargen_generate_class_result.layout")
|
||||||
{
|
{
|
||||||
// Centre dialog
|
// Centre dialog
|
||||||
center();
|
center();
|
||||||
|
@ -67,8 +67,8 @@ void GenerateClassResultDialog::onBackClicked(MyGUI::Widget* _sender)
|
||||||
|
|
||||||
/* PickClassDialog */
|
/* PickClassDialog */
|
||||||
|
|
||||||
PickClassDialog::PickClassDialog(MWBase::WindowManager& parWindowManager)
|
PickClassDialog::PickClassDialog()
|
||||||
: WindowModal("openmw_chargen_class.layout", parWindowManager)
|
: WindowModal("openmw_chargen_class.layout")
|
||||||
{
|
{
|
||||||
// Centre dialog
|
// Centre dialog
|
||||||
center();
|
center();
|
||||||
|
@ -272,8 +272,8 @@ void InfoBoxDialog::layoutVertically(MyGUI::Widget* widget, int margin)
|
||||||
widget->setSize(width, pos);
|
widget->setSize(width, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
InfoBoxDialog::InfoBoxDialog(MWBase::WindowManager& parWindowManager)
|
InfoBoxDialog::InfoBoxDialog()
|
||||||
: WindowModal("openmw_infobox.layout", parWindowManager)
|
: WindowModal("openmw_infobox.layout")
|
||||||
, mCurrentButton(-1)
|
, mCurrentButton(-1)
|
||||||
{
|
{
|
||||||
getWidget(mTextBox, "TextBox");
|
getWidget(mTextBox, "TextBox");
|
||||||
|
@ -356,8 +356,8 @@ void InfoBoxDialog::onButtonClicked(MyGUI::Widget* _sender)
|
||||||
|
|
||||||
/* ClassChoiceDialog */
|
/* ClassChoiceDialog */
|
||||||
|
|
||||||
ClassChoiceDialog::ClassChoiceDialog(MWBase::WindowManager& parWindowManager)
|
ClassChoiceDialog::ClassChoiceDialog()
|
||||||
: InfoBoxDialog(parWindowManager)
|
: InfoBoxDialog()
|
||||||
{
|
{
|
||||||
setText("");
|
setText("");
|
||||||
ButtonList buttons;
|
ButtonList buttons;
|
||||||
|
@ -370,8 +370,8 @@ ClassChoiceDialog::ClassChoiceDialog(MWBase::WindowManager& parWindowManager)
|
||||||
|
|
||||||
/* CreateClassDialog */
|
/* CreateClassDialog */
|
||||||
|
|
||||||
CreateClassDialog::CreateClassDialog(MWBase::WindowManager& parWindowManager)
|
CreateClassDialog::CreateClassDialog()
|
||||||
: WindowModal("openmw_chargen_create_class.layout", parWindowManager)
|
: WindowModal("openmw_chargen_create_class.layout")
|
||||||
, mSpecDialog(NULL)
|
, mSpecDialog(NULL)
|
||||||
, mAttribDialog(NULL)
|
, mAttribDialog(NULL)
|
||||||
, mSkillDialog(NULL)
|
, mSkillDialog(NULL)
|
||||||
|
@ -540,7 +540,7 @@ void CreateClassDialog::onDialogCancel()
|
||||||
void CreateClassDialog::onSpecializationClicked(MyGUI::Widget* _sender)
|
void CreateClassDialog::onSpecializationClicked(MyGUI::Widget* _sender)
|
||||||
{
|
{
|
||||||
delete mSpecDialog;
|
delete mSpecDialog;
|
||||||
mSpecDialog = new SelectSpecializationDialog(*MWBase::Environment::get().getWindowManager());
|
mSpecDialog = new SelectSpecializationDialog();
|
||||||
mSpecDialog->eventCancel += MyGUI::newDelegate(this, &CreateClassDialog::onDialogCancel);
|
mSpecDialog->eventCancel += MyGUI::newDelegate(this, &CreateClassDialog::onDialogCancel);
|
||||||
mSpecDialog->eventItemSelected += MyGUI::newDelegate(this, &CreateClassDialog::onSpecializationSelected);
|
mSpecDialog->eventItemSelected += MyGUI::newDelegate(this, &CreateClassDialog::onSpecializationSelected);
|
||||||
mSpecDialog->setVisible(true);
|
mSpecDialog->setVisible(true);
|
||||||
|
@ -571,7 +571,7 @@ void CreateClassDialog::setSpecialization(int id)
|
||||||
void CreateClassDialog::onAttributeClicked(Widgets::MWAttributePtr _sender)
|
void CreateClassDialog::onAttributeClicked(Widgets::MWAttributePtr _sender)
|
||||||
{
|
{
|
||||||
delete mAttribDialog;
|
delete mAttribDialog;
|
||||||
mAttribDialog = new SelectAttributeDialog(*MWBase::Environment::get().getWindowManager());
|
mAttribDialog = new SelectAttributeDialog();
|
||||||
mAffectedAttribute = _sender;
|
mAffectedAttribute = _sender;
|
||||||
mAttribDialog->eventCancel += MyGUI::newDelegate(this, &CreateClassDialog::onDialogCancel);
|
mAttribDialog->eventCancel += MyGUI::newDelegate(this, &CreateClassDialog::onDialogCancel);
|
||||||
mAttribDialog->eventItemSelected += MyGUI::newDelegate(this, &CreateClassDialog::onAttributeSelected);
|
mAttribDialog->eventItemSelected += MyGUI::newDelegate(this, &CreateClassDialog::onAttributeSelected);
|
||||||
|
@ -601,7 +601,7 @@ void CreateClassDialog::onAttributeSelected()
|
||||||
void CreateClassDialog::onSkillClicked(Widgets::MWSkillPtr _sender)
|
void CreateClassDialog::onSkillClicked(Widgets::MWSkillPtr _sender)
|
||||||
{
|
{
|
||||||
delete mSkillDialog;
|
delete mSkillDialog;
|
||||||
mSkillDialog = new SelectSkillDialog(*MWBase::Environment::get().getWindowManager());
|
mSkillDialog = new SelectSkillDialog();
|
||||||
mAffectedSkill = _sender;
|
mAffectedSkill = _sender;
|
||||||
mSkillDialog->eventCancel += MyGUI::newDelegate(this, &CreateClassDialog::onDialogCancel);
|
mSkillDialog->eventCancel += MyGUI::newDelegate(this, &CreateClassDialog::onDialogCancel);
|
||||||
mSkillDialog->eventItemSelected += MyGUI::newDelegate(this, &CreateClassDialog::onSkillSelected);
|
mSkillDialog->eventItemSelected += MyGUI::newDelegate(this, &CreateClassDialog::onSkillSelected);
|
||||||
|
@ -633,7 +633,7 @@ void CreateClassDialog::onSkillSelected()
|
||||||
|
|
||||||
void CreateClassDialog::onDescriptionClicked(MyGUI::Widget* _sender)
|
void CreateClassDialog::onDescriptionClicked(MyGUI::Widget* _sender)
|
||||||
{
|
{
|
||||||
mDescDialog = new DescriptionDialog(*MWBase::Environment::get().getWindowManager());
|
mDescDialog = new DescriptionDialog();
|
||||||
mDescDialog->setTextInput(mDescription);
|
mDescDialog->setTextInput(mDescription);
|
||||||
mDescDialog->eventDone += MyGUI::newDelegate(this, &CreateClassDialog::onDescriptionEntered);
|
mDescDialog->eventDone += MyGUI::newDelegate(this, &CreateClassDialog::onDescriptionEntered);
|
||||||
mDescDialog->setVisible(true);
|
mDescDialog->setVisible(true);
|
||||||
|
@ -660,8 +660,8 @@ void CreateClassDialog::onBackClicked(MyGUI::Widget* _sender)
|
||||||
|
|
||||||
/* SelectSpecializationDialog */
|
/* SelectSpecializationDialog */
|
||||||
|
|
||||||
SelectSpecializationDialog::SelectSpecializationDialog(MWBase::WindowManager& parWindowManager)
|
SelectSpecializationDialog::SelectSpecializationDialog()
|
||||||
: WindowModal("openmw_chargen_select_specialization.layout", parWindowManager)
|
: WindowModal("openmw_chargen_select_specialization.layout")
|
||||||
{
|
{
|
||||||
// Centre dialog
|
// Centre dialog
|
||||||
center();
|
center();
|
||||||
|
@ -720,8 +720,8 @@ void SelectSpecializationDialog::onCancelClicked(MyGUI::Widget* _sender)
|
||||||
|
|
||||||
/* SelectAttributeDialog */
|
/* SelectAttributeDialog */
|
||||||
|
|
||||||
SelectAttributeDialog::SelectAttributeDialog(MWBase::WindowManager& parWindowManager)
|
SelectAttributeDialog::SelectAttributeDialog()
|
||||||
: WindowModal("openmw_chargen_select_attribute.layout", parWindowManager)
|
: WindowModal("openmw_chargen_select_attribute.layout")
|
||||||
{
|
{
|
||||||
// Centre dialog
|
// Centre dialog
|
||||||
center();
|
center();
|
||||||
|
@ -766,8 +766,8 @@ void SelectAttributeDialog::onCancelClicked(MyGUI::Widget* _sender)
|
||||||
|
|
||||||
/* SelectSkillDialog */
|
/* SelectSkillDialog */
|
||||||
|
|
||||||
SelectSkillDialog::SelectSkillDialog(MWBase::WindowManager& parWindowManager)
|
SelectSkillDialog::SelectSkillDialog()
|
||||||
: WindowModal("openmw_chargen_select_skill.layout", parWindowManager)
|
: WindowModal("openmw_chargen_select_skill.layout")
|
||||||
{
|
{
|
||||||
// Centre dialog
|
// Centre dialog
|
||||||
center();
|
center();
|
||||||
|
@ -856,8 +856,8 @@ void SelectSkillDialog::onCancelClicked(MyGUI::Widget* _sender)
|
||||||
|
|
||||||
/* DescriptionDialog */
|
/* DescriptionDialog */
|
||||||
|
|
||||||
DescriptionDialog::DescriptionDialog(MWBase::WindowManager& parWindowManager)
|
DescriptionDialog::DescriptionDialog()
|
||||||
: WindowModal("openmw_chargen_class_description.layout", parWindowManager)
|
: WindowModal("openmw_chargen_class_description.layout")
|
||||||
{
|
{
|
||||||
// Centre dialog
|
// Centre dialog
|
||||||
center();
|
center();
|
||||||
|
|
|
@ -15,7 +15,7 @@ namespace MWGui
|
||||||
class InfoBoxDialog : public WindowModal
|
class InfoBoxDialog : public WindowModal
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
InfoBoxDialog(MWBase::WindowManager& parWindowManager);
|
InfoBoxDialog();
|
||||||
|
|
||||||
typedef std::vector<std::string> ButtonList;
|
typedef std::vector<std::string> ButtonList;
|
||||||
|
|
||||||
|
@ -60,13 +60,13 @@ namespace MWGui
|
||||||
Class_Create = 2,
|
Class_Create = 2,
|
||||||
Class_Back = 3
|
Class_Back = 3
|
||||||
};
|
};
|
||||||
ClassChoiceDialog(MWBase::WindowManager& parWindowManager);
|
ClassChoiceDialog();
|
||||||
};
|
};
|
||||||
|
|
||||||
class GenerateClassResultDialog : public WindowModal
|
class GenerateClassResultDialog : public WindowModal
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GenerateClassResultDialog(MWBase::WindowManager& parWindowManager);
|
GenerateClassResultDialog();
|
||||||
|
|
||||||
std::string getClassId() const;
|
std::string getClassId() const;
|
||||||
void setClassId(const std::string &classId);
|
void setClassId(const std::string &classId);
|
||||||
|
@ -93,7 +93,7 @@ namespace MWGui
|
||||||
class PickClassDialog : public WindowModal
|
class PickClassDialog : public WindowModal
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PickClassDialog(MWBase::WindowManager& parWindowManager);
|
PickClassDialog();
|
||||||
|
|
||||||
const std::string &getClassId() const { return mCurrentClassId; }
|
const std::string &getClassId() const { return mCurrentClassId; }
|
||||||
void setClassId(const std::string &classId);
|
void setClassId(const std::string &classId);
|
||||||
|
@ -132,7 +132,7 @@ namespace MWGui
|
||||||
class SelectSpecializationDialog : public WindowModal
|
class SelectSpecializationDialog : public WindowModal
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SelectSpecializationDialog(MWBase::WindowManager& parWindowManager);
|
SelectSpecializationDialog();
|
||||||
~SelectSpecializationDialog();
|
~SelectSpecializationDialog();
|
||||||
|
|
||||||
ESM::Class::Specialization getSpecializationId() const { return mSpecializationId; }
|
ESM::Class::Specialization getSpecializationId() const { return mSpecializationId; }
|
||||||
|
@ -163,7 +163,7 @@ namespace MWGui
|
||||||
class SelectAttributeDialog : public WindowModal
|
class SelectAttributeDialog : public WindowModal
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SelectAttributeDialog(MWBase::WindowManager& parWindowManager);
|
SelectAttributeDialog();
|
||||||
~SelectAttributeDialog();
|
~SelectAttributeDialog();
|
||||||
|
|
||||||
ESM::Attribute::AttributeID getAttributeId() const { return mAttributeId; }
|
ESM::Attribute::AttributeID getAttributeId() const { return mAttributeId; }
|
||||||
|
@ -192,7 +192,7 @@ namespace MWGui
|
||||||
class SelectSkillDialog : public WindowModal
|
class SelectSkillDialog : public WindowModal
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SelectSkillDialog(MWBase::WindowManager& parWindowManager);
|
SelectSkillDialog();
|
||||||
~SelectSkillDialog();
|
~SelectSkillDialog();
|
||||||
|
|
||||||
ESM::Skill::SkillEnum getSkillId() const { return mSkillId; }
|
ESM::Skill::SkillEnum getSkillId() const { return mSkillId; }
|
||||||
|
@ -225,7 +225,7 @@ namespace MWGui
|
||||||
class DescriptionDialog : public WindowModal
|
class DescriptionDialog : public WindowModal
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DescriptionDialog(MWBase::WindowManager& parWindowManager);
|
DescriptionDialog();
|
||||||
~DescriptionDialog();
|
~DescriptionDialog();
|
||||||
|
|
||||||
std::string getTextInput() const { return mTextEdit ? mTextEdit->getOnlyText() : ""; }
|
std::string getTextInput() const { return mTextEdit ? mTextEdit->getOnlyText() : ""; }
|
||||||
|
@ -241,7 +241,7 @@ namespace MWGui
|
||||||
class CreateClassDialog : public WindowModal
|
class CreateClassDialog : public WindowModal
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CreateClassDialog(MWBase::WindowManager& parWindowManager);
|
CreateClassDialog();
|
||||||
virtual ~CreateClassDialog();
|
virtual ~CreateClassDialog();
|
||||||
|
|
||||||
std::string getName() const;
|
std::string getName() const;
|
||||||
|
|
|
@ -13,9 +13,9 @@
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
|
|
||||||
CompanionWindow::CompanionWindow(MWBase::WindowManager &parWindowManager, DragAndDrop *dragAndDrop, MessageBoxManager* manager)
|
CompanionWindow::CompanionWindow(DragAndDrop *dragAndDrop, MessageBoxManager* manager)
|
||||||
: ContainerBase(dragAndDrop)
|
: ContainerBase(dragAndDrop)
|
||||||
, WindowBase("openmw_companion_window.layout", parWindowManager)
|
, WindowBase("openmw_companion_window.layout")
|
||||||
, mMessageBoxManager(manager)
|
, mMessageBoxManager(manager)
|
||||||
{
|
{
|
||||||
MyGUI::ScrollView* itemView;
|
MyGUI::ScrollView* itemView;
|
||||||
|
|
|
@ -11,7 +11,7 @@ namespace MWGui
|
||||||
class CompanionWindow : public ContainerBase, public WindowBase
|
class CompanionWindow : public ContainerBase, public WindowBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CompanionWindow(MWBase::WindowManager& parWindowManager,DragAndDrop* dragAndDrop, MessageBoxManager* manager);
|
CompanionWindow(DragAndDrop* dragAndDrop, MessageBoxManager* manager);
|
||||||
virtual ~CompanionWindow() {}
|
virtual ~CompanionWindow() {}
|
||||||
|
|
||||||
void open(MWWorld::Ptr npc);
|
void open(MWWorld::Ptr npc);
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
|
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
ConfirmationDialog::ConfirmationDialog(MWBase::WindowManager& parWindowManager) :
|
ConfirmationDialog::ConfirmationDialog() :
|
||||||
WindowModal("openmw_confirmation_dialog.layout", parWindowManager)
|
WindowModal("openmw_confirmation_dialog.layout")
|
||||||
{
|
{
|
||||||
getWidget(mMessage, "Message");
|
getWidget(mMessage, "Message");
|
||||||
getWidget(mOkButton, "OkButton");
|
getWidget(mOkButton, "OkButton");
|
||||||
|
|
|
@ -8,7 +8,7 @@ namespace MWGui
|
||||||
class ConfirmationDialog : public WindowModal
|
class ConfirmationDialog : public WindowModal
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ConfirmationDialog(MWBase::WindowManager& parWindowManager);
|
ConfirmationDialog();
|
||||||
void open(const std::string& message);
|
void open(const std::string& message);
|
||||||
|
|
||||||
typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;
|
typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;
|
||||||
|
|
|
@ -649,9 +649,9 @@ MWWorld::ContainerStore& ContainerBase::getContainerStore()
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
ContainerWindow::ContainerWindow(MWBase::WindowManager& parWindowManager,DragAndDrop* dragAndDrop)
|
ContainerWindow::ContainerWindow(DragAndDrop* dragAndDrop)
|
||||||
: ContainerBase(dragAndDrop)
|
: ContainerBase(dragAndDrop)
|
||||||
, WindowBase("openmw_container_window.layout", parWindowManager)
|
, WindowBase("openmw_container_window.layout")
|
||||||
{
|
{
|
||||||
getWidget(mDisposeCorpseButton, "DisposeCorpseButton");
|
getWidget(mDisposeCorpseButton, "DisposeCorpseButton");
|
||||||
getWidget(mTakeButton, "TakeButton");
|
getWidget(mTakeButton, "TakeButton");
|
||||||
|
|
|
@ -134,7 +134,7 @@ namespace MWGui
|
||||||
class ContainerWindow : public ContainerBase, public WindowBase
|
class ContainerWindow : public ContainerBase, public WindowBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ContainerWindow(MWBase::WindowManager& parWindowManager,DragAndDrop* dragAndDrop);
|
ContainerWindow(DragAndDrop* dragAndDrop);
|
||||||
|
|
||||||
virtual ~ContainerWindow();
|
virtual ~ContainerWindow();
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
|
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
CountDialog::CountDialog(MWBase::WindowManager& parWindowManager) :
|
CountDialog::CountDialog() :
|
||||||
WindowModal("openmw_count_window.layout", parWindowManager)
|
WindowModal("openmw_count_window.layout")
|
||||||
{
|
{
|
||||||
getWidget(mSlider, "CountSlider");
|
getWidget(mSlider, "CountSlider");
|
||||||
getWidget(mItemEdit, "ItemEdit");
|
getWidget(mItemEdit, "ItemEdit");
|
||||||
|
|
|
@ -8,7 +8,7 @@ namespace MWGui
|
||||||
class CountDialog : public WindowModal
|
class CountDialog : public WindowModal
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CountDialog(MWBase::WindowManager& parWindowManager);
|
CountDialog();
|
||||||
void open(const std::string& item, const std::string& message, const int maxCount);
|
void open(const std::string& item, const std::string& message, const int maxCount);
|
||||||
|
|
||||||
typedef MyGUI::delegates::CMultiDelegate2<MyGUI::Widget*, int> EventHandle_WidgetInt;
|
typedef MyGUI::delegates::CMultiDelegate2<MyGUI::Widget*, int> EventHandle_WidgetInt;
|
||||||
|
|
|
@ -55,8 +55,8 @@ bool sortByLength (const std::string& left, const std::string& right)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
PersuasionDialog::PersuasionDialog(MWBase::WindowManager &parWindowManager)
|
PersuasionDialog::PersuasionDialog()
|
||||||
: WindowModal("openmw_persuasion_dialog.layout", parWindowManager)
|
: WindowModal("openmw_persuasion_dialog.layout")
|
||||||
{
|
{
|
||||||
getWidget(mCancelButton, "CancelButton");
|
getWidget(mCancelButton, "CancelButton");
|
||||||
getWidget(mAdmireButton, "AdmireButton");
|
getWidget(mAdmireButton, "AdmireButton");
|
||||||
|
@ -124,9 +124,9 @@ void PersuasionDialog::open()
|
||||||
|
|
||||||
// --------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
DialogueWindow::DialogueWindow(MWBase::WindowManager& parWindowManager)
|
DialogueWindow::DialogueWindow()
|
||||||
: WindowBase("openmw_dialogue_window.layout", parWindowManager)
|
: WindowBase("openmw_dialogue_window.layout")
|
||||||
, mPersuasionDialog(parWindowManager)
|
, mPersuasionDialog()
|
||||||
, mEnabled(false)
|
, mEnabled(false)
|
||||||
, mServices(0)
|
, mServices(0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,7 +29,7 @@ namespace MWGui
|
||||||
class PersuasionDialog : public WindowModal
|
class PersuasionDialog : public WindowModal
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PersuasionDialog(MWBase::WindowManager& parWindowManager);
|
PersuasionDialog();
|
||||||
|
|
||||||
virtual void open();
|
virtual void open();
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ namespace MWGui
|
||||||
class DialogueWindow: public WindowBase, public ReferenceInterface
|
class DialogueWindow: public WindowBase, public ReferenceInterface
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DialogueWindow(MWBase::WindowManager& parWindowManager);
|
DialogueWindow();
|
||||||
|
|
||||||
// Events
|
// Events
|
||||||
typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;
|
typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;
|
||||||
|
|
|
@ -15,9 +15,9 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
EnchantingDialog::EnchantingDialog(MWBase::WindowManager &parWindowManager)
|
EnchantingDialog::EnchantingDialog()
|
||||||
: WindowBase("openmw_enchanting_dialog.layout", parWindowManager)
|
: WindowBase("openmw_enchanting_dialog.layout")
|
||||||
, EffectEditorBase(parWindowManager)
|
, EffectEditorBase()
|
||||||
, mItemSelectionDialog(NULL)
|
, mItemSelectionDialog(NULL)
|
||||||
{
|
{
|
||||||
getWidget(mName, "NameEdit");
|
getWidget(mName, "NameEdit");
|
||||||
|
@ -139,7 +139,7 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
delete mItemSelectionDialog;
|
delete mItemSelectionDialog;
|
||||||
mItemSelectionDialog = new ItemSelectionDialog("#{sEnchantItems}",
|
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->eventItemSelected += MyGUI::newDelegate(this, &EnchantingDialog::onItemSelected);
|
||||||
mItemSelectionDialog->eventDialogCanceled += MyGUI::newDelegate(this, &EnchantingDialog::onItemCancel);
|
mItemSelectionDialog->eventDialogCanceled += MyGUI::newDelegate(this, &EnchantingDialog::onItemCancel);
|
||||||
mItemSelectionDialog->setVisible(true);
|
mItemSelectionDialog->setVisible(true);
|
||||||
|
@ -227,7 +227,7 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
delete mItemSelectionDialog;
|
delete mItemSelectionDialog;
|
||||||
mItemSelectionDialog = new ItemSelectionDialog("#{sSoulGemsWithSouls}",
|
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->eventItemSelected += MyGUI::newDelegate(this, &EnchantingDialog::onSoulSelected);
|
||||||
mItemSelectionDialog->eventDialogCanceled += MyGUI::newDelegate(this, &EnchantingDialog::onSoulCancel);
|
mItemSelectionDialog->eventDialogCanceled += MyGUI::newDelegate(this, &EnchantingDialog::onSoulCancel);
|
||||||
mItemSelectionDialog->setVisible(true);
|
mItemSelectionDialog->setVisible(true);
|
||||||
|
|
|
@ -17,7 +17,7 @@ namespace MWGui
|
||||||
class EnchantingDialog : public WindowBase, public ReferenceInterface, public EffectEditorBase
|
class EnchantingDialog : public WindowBase, public ReferenceInterface, public EffectEditorBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
EnchantingDialog(MWBase::WindowManager& parWindowManager);
|
EnchantingDialog();
|
||||||
virtual ~EnchantingDialog();
|
virtual ~EnchantingDialog();
|
||||||
|
|
||||||
virtual void open();
|
virtual void open();
|
||||||
|
|
|
@ -30,9 +30,9 @@
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
|
|
||||||
InventoryWindow::InventoryWindow(MWBase::WindowManager& parWindowManager,DragAndDrop* dragAndDrop)
|
InventoryWindow::InventoryWindow(DragAndDrop* dragAndDrop)
|
||||||
: ContainerBase(dragAndDrop)
|
: ContainerBase(dragAndDrop)
|
||||||
, WindowPinnableBase("openmw_inventory_window.layout", parWindowManager)
|
, WindowPinnableBase("openmw_inventory_window.layout")
|
||||||
, mTrading(false)
|
, mTrading(false)
|
||||||
, mLastXSize(0)
|
, mLastXSize(0)
|
||||||
, mLastYSize(0)
|
, mLastYSize(0)
|
||||||
|
|
|
@ -12,7 +12,7 @@ namespace MWGui
|
||||||
class InventoryWindow : public ContainerBase, public WindowPinnableBase
|
class InventoryWindow : public ContainerBase, public WindowPinnableBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
InventoryWindow(MWBase::WindowManager& parWindowManager,DragAndDrop* dragAndDrop);
|
InventoryWindow(DragAndDrop* dragAndDrop);
|
||||||
|
|
||||||
virtual void open();
|
virtual void open();
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
|
|
||||||
ItemSelectionDialog::ItemSelectionDialog(const std::string &label, int filter, MWBase::WindowManager& parWindowManager)
|
ItemSelectionDialog::ItemSelectionDialog(const std::string &label, int filter)
|
||||||
: ContainerBase(NULL)
|
: ContainerBase(NULL)
|
||||||
, WindowModal("openmw_itemselection_dialog.layout", parWindowManager)
|
, WindowModal("openmw_itemselection_dialog.layout")
|
||||||
{
|
{
|
||||||
mFilter = filter;
|
mFilter = filter;
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ namespace MWGui
|
||||||
class ItemSelectionDialog : public ContainerBase, public WindowModal
|
class ItemSelectionDialog : public ContainerBase, public WindowModal
|
||||||
{
|
{
|
||||||
public:
|
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::CMultiDelegate0 EventHandle_Void;
|
||||||
typedef MyGUI::delegates::CMultiDelegate1<MWWorld::Ptr> EventHandle_Item;
|
typedef MyGUI::delegates::CMultiDelegate1<MWWorld::Ptr> EventHandle_Item;
|
||||||
|
|
|
@ -81,8 +81,8 @@ book formatText(std::string text,book mBook,int maxLine, int lineSize)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
MWGui::JournalWindow::JournalWindow (MWBase::WindowManager& parWindowManager)
|
MWGui::JournalWindow::JournalWindow ()
|
||||||
: WindowBase("openmw_journal.layout", parWindowManager)
|
: WindowBase("openmw_journal.layout")
|
||||||
, mPageNumber(0)
|
, mPageNumber(0)
|
||||||
{
|
{
|
||||||
mMainWidget->setVisible(false);
|
mMainWidget->setVisible(false);
|
||||||
|
|
|
@ -14,7 +14,7 @@ namespace MWGui
|
||||||
class JournalWindow : public WindowBase
|
class JournalWindow : public WindowBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
JournalWindow(MWBase::WindowManager& parWindowManager);
|
JournalWindow();
|
||||||
virtual void open();
|
virtual void open();
|
||||||
virtual void close();
|
virtual void close();
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
|
|
||||||
LevelupDialog::LevelupDialog(MWBase::WindowManager &parWindowManager)
|
LevelupDialog::LevelupDialog()
|
||||||
: WindowBase("openmw_levelup_dialog.layout", parWindowManager)
|
: WindowBase("openmw_levelup_dialog.layout")
|
||||||
{
|
{
|
||||||
getWidget(mOkButton, "OkButton");
|
getWidget(mOkButton, "OkButton");
|
||||||
getWidget(mClassImage, "ClassImage");
|
getWidget(mClassImage, "ClassImage");
|
||||||
|
|
|
@ -9,7 +9,7 @@ namespace MWGui
|
||||||
class LevelupDialog : public WindowBase
|
class LevelupDialog : public WindowBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LevelupDialog(MWBase::WindowManager& parWindowManager);
|
LevelupDialog();
|
||||||
|
|
||||||
virtual void open();
|
virtual void open();
|
||||||
|
|
||||||
|
|
|
@ -23,10 +23,10 @@
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
|
|
||||||
LoadingScreen::LoadingScreen(Ogre::SceneManager* sceneMgr, Ogre::RenderWindow* rw, MWBase::WindowManager& parWindowManager)
|
LoadingScreen::LoadingScreen(Ogre::SceneManager* sceneMgr, Ogre::RenderWindow* rw)
|
||||||
: mSceneMgr(sceneMgr)
|
: mSceneMgr(sceneMgr)
|
||||||
, mWindow(rw)
|
, mWindow(rw)
|
||||||
, WindowBase("openmw_loading_screen.layout", parWindowManager)
|
, WindowBase("openmw_loading_screen.layout")
|
||||||
, mLoadingOn(false)
|
, mLoadingOn(false)
|
||||||
, mLastRenderTime(0.f)
|
, mLastRenderTime(0.f)
|
||||||
, mLastWallpaperChangeTime(0.f)
|
, mLastWallpaperChangeTime(0.f)
|
||||||
|
|
|
@ -11,7 +11,7 @@ namespace MWGui
|
||||||
class LoadingScreen : public WindowBase
|
class LoadingScreen : public WindowBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LoadingScreen(Ogre::SceneManager* sceneMgr, Ogre::RenderWindow* rw, MWBase::WindowManager& parWindowManager);
|
LoadingScreen(Ogre::SceneManager* sceneMgr, Ogre::RenderWindow* rw);
|
||||||
virtual ~LoadingScreen();
|
virtual ~LoadingScreen();
|
||||||
|
|
||||||
void setLoadingProgress (const std::string& stage, int depth, int current, int total);
|
void setLoadingProgress (const std::string& stage, int depth, int current, int total);
|
||||||
|
|
|
@ -262,8 +262,8 @@ void LocalMapBase::setPlayerDir(const float x, const float y)
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
MapWindow::MapWindow(MWBase::WindowManager& parWindowManager, const std::string& cacheDir)
|
MapWindow::MapWindow(const std::string& cacheDir)
|
||||||
: MWGui::WindowPinnableBase("openmw_map_window.layout", parWindowManager)
|
: MWGui::WindowPinnableBase("openmw_map_window.layout")
|
||||||
, mGlobal(false)
|
, mGlobal(false)
|
||||||
{
|
{
|
||||||
setCoord(500,0,320,300);
|
setCoord(500,0,320,300);
|
||||||
|
|
|
@ -65,7 +65,7 @@ namespace MWGui
|
||||||
class MapWindow : public MWGui::WindowPinnableBase, public LocalMapBase
|
class MapWindow : public MWGui::WindowPinnableBase, public LocalMapBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MapWindow(MWBase::WindowManager& parWindowManager, const std::string& cacheDir);
|
MapWindow(const std::string& cacheDir);
|
||||||
virtual ~MapWindow();
|
virtual ~MapWindow();
|
||||||
|
|
||||||
void setCellName(const std::string& cellName);
|
void setCellName(const std::string& cellName);
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
|
|
||||||
MerchantRepair::MerchantRepair(MWBase::WindowManager &parWindowManager)
|
MerchantRepair::MerchantRepair()
|
||||||
: WindowBase("openmw_merchantrepair.layout", parWindowManager)
|
: WindowBase("openmw_merchantrepair.layout")
|
||||||
{
|
{
|
||||||
getWidget(mList, "RepairView");
|
getWidget(mList, "RepairView");
|
||||||
getWidget(mOkButton, "OkButton");
|
getWidget(mOkButton, "OkButton");
|
||||||
|
|
|
@ -12,7 +12,7 @@ namespace MWGui
|
||||||
class MerchantRepair : public WindowBase
|
class MerchantRepair : public WindowBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MerchantRepair(MWBase::WindowManager &parWindowManager);
|
MerchantRepair();
|
||||||
|
|
||||||
virtual void open();
|
virtual void open();
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
using namespace MWGui;
|
using namespace MWGui;
|
||||||
|
|
||||||
MessageBoxManager::MessageBoxManager (MWBase::WindowManager* windowManager)
|
MessageBoxManager::MessageBoxManager ()
|
||||||
{
|
{
|
||||||
// defines
|
// defines
|
||||||
mMessageBoxSpeed = 0.1;
|
mMessageBoxSpeed = 0.1;
|
||||||
|
@ -212,7 +212,7 @@ int MessageBox::getHeight ()
|
||||||
|
|
||||||
|
|
||||||
InteractiveMessageBox::InteractiveMessageBox(MessageBoxManager& parMessageBoxManager, const std::string& message, const std::vector<std::string>& buttons)
|
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)
|
, mMessageBoxManager(parMessageBoxManager)
|
||||||
, mButtonPressed(-1)
|
, mButtonPressed(-1)
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,7 +31,7 @@ namespace MWGui
|
||||||
class MessageBoxManager
|
class MessageBoxManager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MessageBoxManager (MWBase::WindowManager* windowManager);
|
MessageBoxManager ();
|
||||||
void onFrame (float frameDuration);
|
void onFrame (float frameDuration);
|
||||||
void createMessageBox (const std::string& message);
|
void createMessageBox (const std::string& message);
|
||||||
bool createInteractiveMessageBox (const std::string& message, const std::vector<std::string>& buttons);
|
bool createInteractiveMessageBox (const std::string& message, const std::vector<std::string>& buttons);
|
||||||
|
|
|
@ -43,8 +43,8 @@ namespace
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
|
|
||||||
QuickKeysMenu::QuickKeysMenu(MWBase::WindowManager& parWindowManager)
|
QuickKeysMenu::QuickKeysMenu()
|
||||||
: WindowBase("openmw_quickkeys_menu.layout", parWindowManager)
|
: WindowBase("openmw_quickkeys_menu.layout")
|
||||||
, mAssignDialog(0)
|
, mAssignDialog(0)
|
||||||
, mItemSelectionDialog(0)
|
, mItemSelectionDialog(0)
|
||||||
, mMagicSelectionDialog(0)
|
, mMagicSelectionDialog(0)
|
||||||
|
@ -109,7 +109,7 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
// open assign dialog
|
// open assign dialog
|
||||||
if (!mAssignDialog)
|
if (!mAssignDialog)
|
||||||
mAssignDialog = new QuickKeysMenuAssign(*MWBase::Environment::get().getWindowManager(), this);
|
mAssignDialog = new QuickKeysMenuAssign(this);
|
||||||
mAssignDialog->setVisible (true);
|
mAssignDialog->setVisible (true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -124,7 +124,7 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
if (!mItemSelectionDialog )
|
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->eventItemSelected += MyGUI::newDelegate(this, &QuickKeysMenu::onAssignItem);
|
||||||
mItemSelectionDialog->eventDialogCanceled += MyGUI::newDelegate(this, &QuickKeysMenu::onAssignItemCancel);
|
mItemSelectionDialog->eventDialogCanceled += MyGUI::newDelegate(this, &QuickKeysMenu::onAssignItemCancel);
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,7 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
if (!mMagicSelectionDialog )
|
if (!mMagicSelectionDialog )
|
||||||
{
|
{
|
||||||
mMagicSelectionDialog = new MagicSelectionDialog(*MWBase::Environment::get().getWindowManager(), this);
|
mMagicSelectionDialog = new MagicSelectionDialog(this);
|
||||||
}
|
}
|
||||||
mMagicSelectionDialog->setVisible(true);
|
mMagicSelectionDialog->setVisible(true);
|
||||||
|
|
||||||
|
@ -352,8 +352,8 @@ namespace MWGui
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
QuickKeysMenuAssign::QuickKeysMenuAssign (MWBase::WindowManager &parWindowManager, QuickKeysMenu* parent)
|
QuickKeysMenuAssign::QuickKeysMenuAssign (QuickKeysMenu* parent)
|
||||||
: WindowModal("openmw_quickkeys_menu_assign.layout", parWindowManager)
|
: WindowModal("openmw_quickkeys_menu_assign.layout")
|
||||||
, mParent(parent)
|
, mParent(parent)
|
||||||
{
|
{
|
||||||
getWidget(mLabel, "Label");
|
getWidget(mLabel, "Label");
|
||||||
|
@ -399,8 +399,8 @@ namespace MWGui
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
MagicSelectionDialog::MagicSelectionDialog(MWBase::WindowManager &parWindowManager, QuickKeysMenu* parent)
|
MagicSelectionDialog::MagicSelectionDialog(QuickKeysMenu* parent)
|
||||||
: WindowModal("openmw_magicselection_dialog.layout", parWindowManager)
|
: WindowModal("openmw_magicselection_dialog.layout")
|
||||||
, mParent(parent)
|
, mParent(parent)
|
||||||
, mWidth(0)
|
, mWidth(0)
|
||||||
, mHeight(0)
|
, mHeight(0)
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace MWGui
|
||||||
class QuickKeysMenu : public WindowBase
|
class QuickKeysMenu : public WindowBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QuickKeysMenu(MWBase::WindowManager& parWindowManager);
|
QuickKeysMenu();
|
||||||
~QuickKeysMenu();
|
~QuickKeysMenu();
|
||||||
|
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ namespace MWGui
|
||||||
class QuickKeysMenuAssign : public WindowModal
|
class QuickKeysMenuAssign : public WindowModal
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QuickKeysMenuAssign(MWBase::WindowManager& parWindowManager, QuickKeysMenu* parent);
|
QuickKeysMenuAssign(QuickKeysMenu* parent);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MyGUI::TextBox* mLabel;
|
MyGUI::TextBox* mLabel;
|
||||||
|
@ -79,7 +79,7 @@ namespace MWGui
|
||||||
class MagicSelectionDialog : public WindowModal
|
class MagicSelectionDialog : public WindowModal
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MagicSelectionDialog(MWBase::WindowManager& parWindowManager, QuickKeysMenu* parent);
|
MagicSelectionDialog(QuickKeysMenu* parent);
|
||||||
|
|
||||||
virtual void open();
|
virtual void open();
|
||||||
|
|
||||||
|
|
|
@ -62,8 +62,8 @@ int countParts(const std::string &part, const std::string &race, bool male)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RaceDialog::RaceDialog(MWBase::WindowManager& parWindowManager)
|
RaceDialog::RaceDialog()
|
||||||
: WindowModal("openmw_chargen_race.layout", parWindowManager)
|
: WindowModal("openmw_chargen_race.layout")
|
||||||
, mGenderIndex(0)
|
, mGenderIndex(0)
|
||||||
, mFaceIndex(0)
|
, mFaceIndex(0)
|
||||||
, mHairIndex(0)
|
, mHairIndex(0)
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace MWGui
|
||||||
class RaceDialog : public WindowModal
|
class RaceDialog : public WindowModal
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RaceDialog(MWBase::WindowManager& parWindowManager);
|
RaceDialog();
|
||||||
|
|
||||||
enum Gender
|
enum Gender
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
|
|
||||||
Repair::Repair(MWBase::WindowManager &parWindowManager)
|
Repair::Repair()
|
||||||
: WindowBase("openmw_repair.layout", parWindowManager)
|
: WindowBase("openmw_repair.layout")
|
||||||
{
|
{
|
||||||
getWidget(mRepairBox, "RepairBox");
|
getWidget(mRepairBox, "RepairBox");
|
||||||
getWidget(mRepairView, "RepairView");
|
getWidget(mRepairView, "RepairView");
|
||||||
|
|
|
@ -12,7 +12,7 @@ namespace MWGui
|
||||||
class Repair : public WindowBase
|
class Repair : public WindowBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Repair(MWBase::WindowManager &parWindowManager);
|
Repair();
|
||||||
|
|
||||||
virtual void open();
|
virtual void open();
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,8 @@ using namespace Widgets;
|
||||||
|
|
||||||
const int ReviewDialog::sLineHeight = 18;
|
const int ReviewDialog::sLineHeight = 18;
|
||||||
|
|
||||||
ReviewDialog::ReviewDialog(MWBase::WindowManager& parWindowManager)
|
ReviewDialog::ReviewDialog()
|
||||||
: WindowModal("openmw_chargen_review.layout", parWindowManager)
|
: WindowModal("openmw_chargen_review.layout")
|
||||||
, mLastPos(0)
|
, mLastPos(0)
|
||||||
{
|
{
|
||||||
// Centre dialog
|
// Centre dialog
|
||||||
|
|
|
@ -28,7 +28,7 @@ namespace MWGui
|
||||||
};
|
};
|
||||||
typedef std::vector<int> SkillList;
|
typedef std::vector<int> SkillList;
|
||||||
|
|
||||||
ReviewDialog(MWBase::WindowManager& parWindowManager);
|
ReviewDialog();
|
||||||
|
|
||||||
void setPlayerName(const std::string &name);
|
void setPlayerName(const std::string &name);
|
||||||
void setRace(const std::string &raceId);
|
void setRace(const std::string &raceId);
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
|
|
||||||
using namespace MWGui;
|
using namespace MWGui;
|
||||||
|
|
||||||
ScrollWindow::ScrollWindow (MWBase::WindowManager& parWindowManager)
|
ScrollWindow::ScrollWindow ()
|
||||||
: WindowBase("openmw_scroll.layout", parWindowManager)
|
: WindowBase("openmw_scroll.layout")
|
||||||
, mTakeButtonShow(true)
|
, mTakeButtonShow(true)
|
||||||
, mTakeButtonAllowed(true)
|
, mTakeButtonAllowed(true)
|
||||||
{
|
{
|
||||||
|
|
|
@ -11,7 +11,7 @@ namespace MWGui
|
||||||
class ScrollWindow : public WindowBase
|
class ScrollWindow : public WindowBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScrollWindow (MWBase::WindowManager& parWindowManager);
|
ScrollWindow ();
|
||||||
|
|
||||||
void open (MWWorld::Ptr scroll);
|
void open (MWWorld::Ptr scroll);
|
||||||
void setTakeButtonShow(bool show);
|
void setTakeButtonShow(bool show);
|
||||||
|
|
|
@ -93,8 +93,8 @@ namespace
|
||||||
|
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
SettingsWindow::SettingsWindow(MWBase::WindowManager& parWindowManager) :
|
SettingsWindow::SettingsWindow() :
|
||||||
WindowBase("openmw_settings_window.layout", parWindowManager)
|
WindowBase("openmw_settings_window.layout")
|
||||||
{
|
{
|
||||||
getWidget(mOkButton, "OkButton");
|
getWidget(mOkButton, "OkButton");
|
||||||
getWidget(mSubtitlesButton, "SubtitlesButton");
|
getWidget(mSubtitlesButton, "SubtitlesButton");
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace MWGui
|
||||||
class SettingsWindow : public WindowBase
|
class SettingsWindow : public WindowBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SettingsWindow(MWBase::WindowManager& parWindowManager);
|
SettingsWindow();
|
||||||
|
|
||||||
virtual void open();
|
virtual void open();
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,8 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
const int SpellBuyingWindow::sLineHeight = 18;
|
const int SpellBuyingWindow::sLineHeight = 18;
|
||||||
|
|
||||||
SpellBuyingWindow::SpellBuyingWindow(MWBase::WindowManager& parWindowManager) :
|
SpellBuyingWindow::SpellBuyingWindow() :
|
||||||
WindowBase("openmw_spell_buying_window.layout", parWindowManager)
|
WindowBase("openmw_spell_buying_window.layout")
|
||||||
, mCurrentY(0)
|
, mCurrentY(0)
|
||||||
, mLastPos(0)
|
, mLastPos(0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,7 +21,7 @@ namespace MWGui
|
||||||
class SpellBuyingWindow : public ReferenceInterface, public WindowBase
|
class SpellBuyingWindow : public ReferenceInterface, public WindowBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SpellBuyingWindow(MWBase::WindowManager& parWindowManager);
|
SpellBuyingWindow();
|
||||||
|
|
||||||
void startSpellBuying(const MWWorld::Ptr& actor);
|
void startSpellBuying(const MWWorld::Ptr& actor);
|
||||||
|
|
||||||
|
|
|
@ -40,8 +40,8 @@ namespace
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
|
|
||||||
EditEffectDialog::EditEffectDialog(MWBase::WindowManager &parWindowManager)
|
EditEffectDialog::EditEffectDialog()
|
||||||
: WindowModal("openmw_edit_effect.layout", parWindowManager)
|
: WindowModal("openmw_edit_effect.layout")
|
||||||
, mEditing(false)
|
, mEditing(false)
|
||||||
{
|
{
|
||||||
getWidget(mCancelButton, "CancelButton");
|
getWidget(mCancelButton, "CancelButton");
|
||||||
|
@ -274,9 +274,9 @@ namespace MWGui
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
SpellCreationDialog::SpellCreationDialog(MWBase::WindowManager &parWindowManager)
|
SpellCreationDialog::SpellCreationDialog()
|
||||||
: WindowBase("openmw_spellcreation_dialog.layout", parWindowManager)
|
: WindowBase("openmw_spellcreation_dialog.layout")
|
||||||
, EffectEditorBase(parWindowManager)
|
, EffectEditorBase()
|
||||||
{
|
{
|
||||||
getWidget(mNameEdit, "NameEdit");
|
getWidget(mNameEdit, "NameEdit");
|
||||||
getWidget(mMagickaCost, "MagickaCost");
|
getWidget(mMagickaCost, "MagickaCost");
|
||||||
|
@ -412,8 +412,8 @@ namespace MWGui
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
EffectEditorBase::EffectEditorBase(MWBase::WindowManager& parWindowManager)
|
EffectEditorBase::EffectEditorBase()
|
||||||
: mAddEffectDialog(parWindowManager)
|
: mAddEffectDialog()
|
||||||
, mSelectAttributeDialog(NULL)
|
, mSelectAttributeDialog(NULL)
|
||||||
, mSelectSkillDialog(NULL)
|
, mSelectSkillDialog(NULL)
|
||||||
{
|
{
|
||||||
|
@ -541,7 +541,7 @@ namespace MWGui
|
||||||
if (effect->mData.mFlags & ESM::MagicEffect::TargetSkill)
|
if (effect->mData.mFlags & ESM::MagicEffect::TargetSkill)
|
||||||
{
|
{
|
||||||
delete mSelectSkillDialog;
|
delete mSelectSkillDialog;
|
||||||
mSelectSkillDialog = new SelectSkillDialog(*MWBase::Environment::get().getWindowManager ());
|
mSelectSkillDialog = new SelectSkillDialog();
|
||||||
mSelectSkillDialog->eventCancel += MyGUI::newDelegate(this, &SpellCreationDialog::onAttributeOrSkillCancel);
|
mSelectSkillDialog->eventCancel += MyGUI::newDelegate(this, &SpellCreationDialog::onAttributeOrSkillCancel);
|
||||||
mSelectSkillDialog->eventItemSelected += MyGUI::newDelegate(this, &SpellCreationDialog::onSelectSkill);
|
mSelectSkillDialog->eventItemSelected += MyGUI::newDelegate(this, &SpellCreationDialog::onSelectSkill);
|
||||||
mSelectSkillDialog->setVisible (true);
|
mSelectSkillDialog->setVisible (true);
|
||||||
|
@ -549,7 +549,7 @@ namespace MWGui
|
||||||
else if (effect->mData.mFlags & ESM::MagicEffect::TargetAttribute)
|
else if (effect->mData.mFlags & ESM::MagicEffect::TargetAttribute)
|
||||||
{
|
{
|
||||||
delete mSelectAttributeDialog;
|
delete mSelectAttributeDialog;
|
||||||
mSelectAttributeDialog = new SelectAttributeDialog(*MWBase::Environment::get().getWindowManager ());
|
mSelectAttributeDialog = new SelectAttributeDialog();
|
||||||
mSelectAttributeDialog->eventCancel += MyGUI::newDelegate(this, &SpellCreationDialog::onAttributeOrSkillCancel);
|
mSelectAttributeDialog->eventCancel += MyGUI::newDelegate(this, &SpellCreationDialog::onAttributeOrSkillCancel);
|
||||||
mSelectAttributeDialog->eventItemSelected += MyGUI::newDelegate(this, &SpellCreationDialog::onSelectAttribute);
|
mSelectAttributeDialog->eventItemSelected += MyGUI::newDelegate(this, &SpellCreationDialog::onSelectAttribute);
|
||||||
mSelectAttributeDialog->setVisible (true);
|
mSelectAttributeDialog->setVisible (true);
|
||||||
|
|
|
@ -15,7 +15,7 @@ namespace MWGui
|
||||||
class EditEffectDialog : public WindowModal
|
class EditEffectDialog : public WindowModal
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
EditEffectDialog(MWBase::WindowManager& parWindowManager);
|
EditEffectDialog();
|
||||||
|
|
||||||
virtual void open();
|
virtual void open();
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ namespace MWGui
|
||||||
class EffectEditorBase
|
class EffectEditorBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
EffectEditorBase(MWBase::WindowManager& parWindowManager);
|
EffectEditorBase();
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -123,7 +123,7 @@ namespace MWGui
|
||||||
class SpellCreationDialog : public WindowBase, public ReferenceInterface, public EffectEditorBase
|
class SpellCreationDialog : public WindowBase, public ReferenceInterface, public EffectEditorBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SpellCreationDialog(MWBase::WindowManager& parWindowManager);
|
SpellCreationDialog();
|
||||||
|
|
||||||
virtual void open();
|
virtual void open();
|
||||||
|
|
||||||
|
|
|
@ -47,8 +47,8 @@ namespace
|
||||||
|
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
SpellWindow::SpellWindow(MWBase::WindowManager& parWindowManager)
|
SpellWindow::SpellWindow()
|
||||||
: WindowPinnableBase("openmw_spell_window.layout", parWindowManager)
|
: WindowPinnableBase("openmw_spell_window.layout")
|
||||||
, mHeight(0)
|
, mHeight(0)
|
||||||
, mWidth(0)
|
, mWidth(0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,7 +10,7 @@ namespace MWGui
|
||||||
class SpellWindow : public WindowPinnableBase
|
class SpellWindow : public WindowPinnableBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SpellWindow(MWBase::WindowManager& parWindowManager);
|
SpellWindow();
|
||||||
virtual ~SpellWindow();
|
virtual ~SpellWindow();
|
||||||
|
|
||||||
void updateSpells();
|
void updateSpells();
|
||||||
|
|
|
@ -22,8 +22,8 @@
|
||||||
using namespace MWGui;
|
using namespace MWGui;
|
||||||
const int StatsWindow::sLineHeight = 18;
|
const int StatsWindow::sLineHeight = 18;
|
||||||
|
|
||||||
StatsWindow::StatsWindow (MWBase::WindowManager& parWindowManager)
|
StatsWindow::StatsWindow ()
|
||||||
: WindowPinnableBase("openmw_stats_window.layout", parWindowManager)
|
: WindowPinnableBase("openmw_stats_window.layout")
|
||||||
, mSkillView(NULL)
|
, mSkillView(NULL)
|
||||||
, mClientHeight(0)
|
, mClientHeight(0)
|
||||||
, mMajorSkills()
|
, mMajorSkills()
|
||||||
|
|
|
@ -22,7 +22,7 @@ namespace MWGui
|
||||||
|
|
||||||
typedef std::vector<int> SkillList;
|
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.
|
/// automatically updates all the data in the stats window, but only if it has changed.
|
||||||
void onFrame();
|
void onFrame();
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
|
|
||||||
using namespace MWGui;
|
using namespace MWGui;
|
||||||
|
|
||||||
TextInputDialog::TextInputDialog(MWBase::WindowManager& parWindowManager)
|
TextInputDialog::TextInputDialog()
|
||||||
: WindowModal("openmw_text_input.layout", parWindowManager)
|
: WindowModal("openmw_text_input.layout")
|
||||||
{
|
{
|
||||||
// Centre dialog
|
// Centre dialog
|
||||||
center();
|
center();
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace MWGui
|
||||||
class TextInputDialog : public WindowModal
|
class TextInputDialog : public WindowModal
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TextInputDialog(MWBase::WindowManager& parWindowManager);
|
TextInputDialog();
|
||||||
|
|
||||||
std::string getTextInput() const { return mTextEdit ? mTextEdit->getOnlyText() : ""; }
|
std::string getTextInput() const { return mTextEdit ? mTextEdit->getOnlyText() : ""; }
|
||||||
void setTextInput(const std::string &text) { if (mTextEdit) mTextEdit->setOnlyText(text); }
|
void setTextInput(const std::string &text) { if (mTextEdit) mTextEdit->setOnlyText(text); }
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
using namespace MWGui;
|
using namespace MWGui;
|
||||||
using namespace MyGUI;
|
using namespace MyGUI;
|
||||||
|
|
||||||
ToolTips::ToolTips(MWBase::WindowManager* windowManager) :
|
ToolTips::ToolTips() :
|
||||||
Layout("openmw_tooltips.layout")
|
Layout("openmw_tooltips.layout")
|
||||||
, mGameMode(true)
|
, mGameMode(true)
|
||||||
, mFullHelp(false)
|
, mFullHelp(false)
|
||||||
|
|
|
@ -39,7 +39,7 @@ namespace MWGui
|
||||||
class ToolTips : public OEngine::GUI::Layout
|
class ToolTips : public OEngine::GUI::Layout
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ToolTips(MWBase::WindowManager* windowManager);
|
ToolTips();
|
||||||
|
|
||||||
void onFrame(float frameDuration);
|
void onFrame(float frameDuration);
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,8 @@ namespace MWGui
|
||||||
const float TradeWindow::sBalanceChangeInitialPause = 0.5;
|
const float TradeWindow::sBalanceChangeInitialPause = 0.5;
|
||||||
const float TradeWindow::sBalanceChangeInterval = 0.1;
|
const float TradeWindow::sBalanceChangeInterval = 0.1;
|
||||||
|
|
||||||
TradeWindow::TradeWindow(MWBase::WindowManager& parWindowManager) :
|
TradeWindow::TradeWindow() :
|
||||||
WindowBase("openmw_trade_window.layout", parWindowManager)
|
WindowBase("openmw_trade_window.layout")
|
||||||
, ContainerBase(NULL) // no drag&drop
|
, ContainerBase(NULL) // no drag&drop
|
||||||
, mCurrentBalance(0)
|
, mCurrentBalance(0)
|
||||||
, mBalanceButtonsState(BBS_None)
|
, mBalanceButtonsState(BBS_None)
|
||||||
|
|
|
@ -23,7 +23,7 @@ namespace MWGui
|
||||||
class TradeWindow : public ContainerBase, public WindowBase
|
class TradeWindow : public ContainerBase, public WindowBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TradeWindow(MWBase::WindowManager& parWindowManager);
|
TradeWindow();
|
||||||
|
|
||||||
void startTrade(MWWorld::Ptr actor);
|
void startTrade(MWWorld::Ptr actor);
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
|
|
||||||
TrainingWindow::TrainingWindow(MWBase::WindowManager &parWindowManager)
|
TrainingWindow::TrainingWindow()
|
||||||
: WindowBase("openmw_trainingwindow.layout", parWindowManager)
|
: WindowBase("openmw_trainingwindow.layout")
|
||||||
, mFadeTimeRemaining(0)
|
, mFadeTimeRemaining(0)
|
||||||
{
|
{
|
||||||
getWidget(mTrainingOptions, "TrainingOptions");
|
getWidget(mTrainingOptions, "TrainingOptions");
|
||||||
|
|
|
@ -10,7 +10,7 @@ namespace MWGui
|
||||||
class TrainingWindow : public WindowBase, public ReferenceInterface
|
class TrainingWindow : public WindowBase, public ReferenceInterface
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TrainingWindow(MWBase::WindowManager& parWindowManager);
|
TrainingWindow();
|
||||||
|
|
||||||
virtual void open();
|
virtual void open();
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,8 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
const int TravelWindow::sLineHeight = 18;
|
const int TravelWindow::sLineHeight = 18;
|
||||||
|
|
||||||
TravelWindow::TravelWindow(MWBase::WindowManager& parWindowManager) :
|
TravelWindow::TravelWindow() :
|
||||||
WindowBase("openmw_travel_window.layout", parWindowManager)
|
WindowBase("openmw_travel_window.layout")
|
||||||
, mCurrentY(0)
|
, mCurrentY(0)
|
||||||
, mLastPos(0)
|
, mLastPos(0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,7 +23,7 @@ namespace MWGui
|
||||||
class TravelWindow : public ReferenceInterface, public WindowBase
|
class TravelWindow : public ReferenceInterface, public WindowBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TravelWindow(MWBase::WindowManager& parWindowManager);
|
TravelWindow();
|
||||||
|
|
||||||
void startTravel(const MWWorld::Ptr& actor);
|
void startTravel(const MWWorld::Ptr& actor);
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
|
|
||||||
WaitDialogProgressBar::WaitDialogProgressBar(MWBase::WindowManager &parWindowManager)
|
WaitDialogProgressBar::WaitDialogProgressBar()
|
||||||
: WindowBase("openmw_wait_dialog_progressbar.layout", parWindowManager)
|
: WindowBase("openmw_wait_dialog_progressbar.layout")
|
||||||
{
|
{
|
||||||
getWidget(mProgressBar, "ProgressBar");
|
getWidget(mProgressBar, "ProgressBar");
|
||||||
getWidget(mProgressText, "ProgressText");
|
getWidget(mProgressText, "ProgressText");
|
||||||
|
@ -46,9 +46,9 @@ namespace MWGui
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
WaitDialog::WaitDialog(MWBase::WindowManager &parWindowManager)
|
WaitDialog::WaitDialog()
|
||||||
: WindowBase("openmw_wait_dialog.layout", parWindowManager)
|
: WindowBase("openmw_wait_dialog.layout")
|
||||||
, mProgressBar(parWindowManager)
|
, mProgressBar()
|
||||||
, mWaiting(false)
|
, mWaiting(false)
|
||||||
, mSleeping(false)
|
, mSleeping(false)
|
||||||
, mHours(1)
|
, mHours(1)
|
||||||
|
|
|
@ -9,7 +9,7 @@ namespace MWGui
|
||||||
class WaitDialogProgressBar : public WindowBase
|
class WaitDialogProgressBar : public WindowBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
WaitDialogProgressBar(MWBase::WindowManager& parWindowManager);
|
WaitDialogProgressBar();
|
||||||
|
|
||||||
virtual void open();
|
virtual void open();
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ namespace MWGui
|
||||||
class WaitDialog : public WindowBase
|
class WaitDialog : public WindowBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
WaitDialog(MWBase::WindowManager& parWindowManager);
|
WaitDialog();
|
||||||
|
|
||||||
virtual void open();
|
virtual void open();
|
||||||
|
|
||||||
|
|
|
@ -34,8 +34,7 @@ void MWGui::Widgets::fixTexturePath(std::string &path)
|
||||||
/* MWSkill */
|
/* MWSkill */
|
||||||
|
|
||||||
MWSkill::MWSkill()
|
MWSkill::MWSkill()
|
||||||
: mManager(NULL)
|
: mSkillId(ESM::Skill::Length)
|
||||||
, mSkillId(ESM::Skill::Length)
|
|
||||||
, mSkillNameWidget(NULL)
|
, mSkillNameWidget(NULL)
|
||||||
, mSkillValueWidget(NULL)
|
, mSkillValueWidget(NULL)
|
||||||
{
|
{
|
||||||
|
@ -65,7 +64,7 @@ void MWSkill::setSkillValue(const SkillValue& value)
|
||||||
|
|
||||||
void MWSkill::updateWidgets()
|
void MWSkill::updateWidgets()
|
||||||
{
|
{
|
||||||
if (mSkillNameWidget && mManager)
|
if (mSkillNameWidget)
|
||||||
{
|
{
|
||||||
if (mSkillId == ESM::Skill::Length)
|
if (mSkillId == ESM::Skill::Length)
|
||||||
{
|
{
|
||||||
|
@ -73,7 +72,7 @@ void MWSkill::updateWidgets()
|
||||||
}
|
}
|
||||||
else
|
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);
|
static_cast<MyGUI::TextBox*>(mSkillNameWidget)->setCaption(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -126,8 +125,7 @@ void MWSkill::initialiseOverride()
|
||||||
/* MWAttribute */
|
/* MWAttribute */
|
||||||
|
|
||||||
MWAttribute::MWAttribute()
|
MWAttribute::MWAttribute()
|
||||||
: mManager(NULL)
|
: mId(-1)
|
||||||
, mId(-1)
|
|
||||||
, mAttributeNameWidget(NULL)
|
, mAttributeNameWidget(NULL)
|
||||||
, mAttributeValueWidget(NULL)
|
, mAttributeValueWidget(NULL)
|
||||||
{
|
{
|
||||||
|
@ -152,7 +150,7 @@ void MWAttribute::onClicked(MyGUI::Widget* _sender)
|
||||||
|
|
||||||
void MWAttribute::updateWidgets()
|
void MWAttribute::updateWidgets()
|
||||||
{
|
{
|
||||||
if (mAttributeNameWidget && mManager)
|
if (mAttributeNameWidget)
|
||||||
{
|
{
|
||||||
if (mId < 0 || mId >= 8)
|
if (mId < 0 || mId >= 8)
|
||||||
{
|
{
|
||||||
|
@ -170,7 +168,7 @@ void MWAttribute::updateWidgets()
|
||||||
"sAttributePersonality",
|
"sAttributePersonality",
|
||||||
"sAttributeLuck"
|
"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);
|
static_cast<MyGUI::TextBox*>(mAttributeNameWidget)->setCaption(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,7 +98,6 @@ namespace MWGui
|
||||||
void setSkillNumber(int skillId);
|
void setSkillNumber(int skillId);
|
||||||
void setSkillValue(const SkillValue& value);
|
void setSkillValue(const SkillValue& value);
|
||||||
|
|
||||||
MWBase::WindowManager *getWindowManager() const { return mManager; }
|
|
||||||
ESM::Skill::SkillEnum getSkillId() const { return mSkillId; }
|
ESM::Skill::SkillEnum getSkillId() const { return mSkillId; }
|
||||||
const SkillValue& getSkillValue() const { return mValue; }
|
const SkillValue& getSkillValue() const { return mValue; }
|
||||||
|
|
||||||
|
@ -121,7 +120,6 @@ namespace MWGui
|
||||||
|
|
||||||
void updateWidgets();
|
void updateWidgets();
|
||||||
|
|
||||||
MWBase::WindowManager *mManager;
|
|
||||||
ESM::Skill::SkillEnum mSkillId;
|
ESM::Skill::SkillEnum mSkillId;
|
||||||
SkillValue mValue;
|
SkillValue mValue;
|
||||||
MyGUI::Widget* mSkillNameWidget;
|
MyGUI::Widget* mSkillNameWidget;
|
||||||
|
@ -140,7 +138,6 @@ namespace MWGui
|
||||||
void setAttributeId(int attributeId);
|
void setAttributeId(int attributeId);
|
||||||
void setAttributeValue(const AttributeValue& value);
|
void setAttributeValue(const AttributeValue& value);
|
||||||
|
|
||||||
MWBase::WindowManager *getWindowManager() const { return mManager; }
|
|
||||||
int getAttributeId() const { return mId; }
|
int getAttributeId() const { return mId; }
|
||||||
const AttributeValue& getAttributeValue() const { return mValue; }
|
const AttributeValue& getAttributeValue() const { return mValue; }
|
||||||
|
|
||||||
|
@ -163,7 +160,6 @@ namespace MWGui
|
||||||
|
|
||||||
void updateWidgets();
|
void updateWidgets();
|
||||||
|
|
||||||
MWBase::WindowManager *mManager;
|
|
||||||
int mId;
|
int mId;
|
||||||
AttributeValue mValue;
|
AttributeValue mValue;
|
||||||
MyGUI::Widget* mAttributeNameWidget;
|
MyGUI::Widget* mAttributeNameWidget;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
using namespace MWGui;
|
using namespace MWGui;
|
||||||
|
|
||||||
WindowBase::WindowBase(const std::string& parLayout, MWBase::WindowManager& parWindowManager)
|
WindowBase::WindowBase(const std::string& parLayout)
|
||||||
: Layout(parLayout)
|
: Layout(parLayout)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -38,8 +38,8 @@ void WindowBase::center()
|
||||||
mMainWidget->setCoord(coord);
|
mMainWidget->setCoord(coord);
|
||||||
}
|
}
|
||||||
|
|
||||||
WindowModal::WindowModal(const std::string& parLayout, MWBase::WindowManager& parWindowManager)
|
WindowModal::WindowModal(const std::string& parLayout)
|
||||||
: WindowBase(parLayout, parWindowManager)
|
: WindowBase(parLayout)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ namespace MWGui
|
||||||
class WindowBase: public OEngine::GUI::Layout
|
class WindowBase: public OEngine::GUI::Layout
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
WindowBase(const std::string& parLayout, MWBase::WindowManager& parWindowManager);
|
WindowBase(const std::string& parLayout);
|
||||||
|
|
||||||
// Events
|
// Events
|
||||||
typedef MyGUI::delegates::CMultiDelegate1<WindowBase*> EventHandle_WindowBase;
|
typedef MyGUI::delegates::CMultiDelegate1<WindowBase*> EventHandle_WindowBase;
|
||||||
|
@ -38,7 +38,7 @@ namespace MWGui
|
||||||
class WindowModal : public WindowBase
|
class WindowModal : public WindowBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
WindowModal(const std::string& parLayout, MWBase::WindowManager& parWindowManager);
|
WindowModal(const std::string& parLayout);
|
||||||
virtual void open();
|
virtual void open();
|
||||||
virtual void close();
|
virtual void close();
|
||||||
};
|
};
|
||||||
|
|
|
@ -162,38 +162,38 @@ WindowManager::WindowManager(
|
||||||
mDragAndDrop->mDragAndDropWidget = dragAndDropWidget;
|
mDragAndDrop->mDragAndDropWidget = dragAndDropWidget;
|
||||||
|
|
||||||
mMenu = new MainMenu(w,h);
|
mMenu = new MainMenu(w,h);
|
||||||
mMap = new MapWindow(*this, cacheDir);
|
mMap = new MapWindow(cacheDir);
|
||||||
mStatsWindow = new StatsWindow(*this);
|
mStatsWindow = new StatsWindow();
|
||||||
mConsole = new Console(w,h, consoleOnlyScripts);
|
mConsole = new Console(w,h, consoleOnlyScripts);
|
||||||
mJournal = new JournalWindow(*this);
|
mJournal = new JournalWindow();
|
||||||
mMessageBoxManager = new MessageBoxManager(this);
|
mMessageBoxManager = new MessageBoxManager();
|
||||||
mInventoryWindow = new InventoryWindow(*this,mDragAndDrop);
|
mInventoryWindow = new InventoryWindow(mDragAndDrop);
|
||||||
mTradeWindow = new TradeWindow(*this);
|
mTradeWindow = new TradeWindow();
|
||||||
mSpellBuyingWindow = new SpellBuyingWindow(*this);
|
mSpellBuyingWindow = new SpellBuyingWindow();
|
||||||
mTravelWindow = new TravelWindow(*this);
|
mTravelWindow = new TravelWindow();
|
||||||
mDialogueWindow = new DialogueWindow(*this);
|
mDialogueWindow = new DialogueWindow();
|
||||||
mContainerWindow = new ContainerWindow(*this,mDragAndDrop);
|
mContainerWindow = new ContainerWindow(mDragAndDrop);
|
||||||
mHud = new HUD(w,h, mShowFPSLevel, mDragAndDrop);
|
mHud = new HUD(w,h, mShowFPSLevel, mDragAndDrop);
|
||||||
mToolTips = new ToolTips(this);
|
mToolTips = new ToolTips();
|
||||||
mScrollWindow = new ScrollWindow(*this);
|
mScrollWindow = new ScrollWindow();
|
||||||
mBookWindow = new BookWindow(*this);
|
mBookWindow = new BookWindow();
|
||||||
mCountDialog = new CountDialog(*this);
|
mCountDialog = new CountDialog();
|
||||||
mSettingsWindow = new SettingsWindow(*this);
|
mSettingsWindow = new SettingsWindow();
|
||||||
mConfirmationDialog = new ConfirmationDialog(*this);
|
mConfirmationDialog = new ConfirmationDialog();
|
||||||
mAlchemyWindow = new AlchemyWindow(*this);
|
mAlchemyWindow = new AlchemyWindow();
|
||||||
mSpellWindow = new SpellWindow(*this);
|
mSpellWindow = new SpellWindow();
|
||||||
mQuickKeysMenu = new QuickKeysMenu(*this);
|
mQuickKeysMenu = new QuickKeysMenu();
|
||||||
mLevelupDialog = new LevelupDialog(*this);
|
mLevelupDialog = new LevelupDialog();
|
||||||
mWaitDialog = new WaitDialog(*this);
|
mWaitDialog = new WaitDialog();
|
||||||
mSpellCreationDialog = new SpellCreationDialog(*this);
|
mSpellCreationDialog = new SpellCreationDialog();
|
||||||
mEnchantingDialog = new EnchantingDialog(*this);
|
mEnchantingDialog = new EnchantingDialog();
|
||||||
mTrainingWindow = new TrainingWindow(*this);
|
mTrainingWindow = new TrainingWindow();
|
||||||
mMerchantRepair = new MerchantRepair(*this);
|
mMerchantRepair = new MerchantRepair();
|
||||||
mRepair = new Repair(*this);
|
mRepair = new Repair();
|
||||||
mSoulgemDialog = new SoulgemDialog(mMessageBoxManager);
|
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);
|
mLoadingScreen->onResChange (w,h);
|
||||||
|
|
||||||
mInputBlocker = mGui->createWidget<MyGUI::Widget>("",0,0,w,h,MyGUI::Align::Default,"Windows","");
|
mInputBlocker = mGui->createWidget<MyGUI::Widget>("",0,0,w,h,MyGUI::Align::Default,"Windows","");
|
||||||
|
@ -202,7 +202,7 @@ WindowManager::WindowManager(
|
||||||
|
|
||||||
mHud->setVisible(mHudEnabled);
|
mHud->setVisible(mHudEnabled);
|
||||||
|
|
||||||
mCharGen = new CharacterCreation(this);
|
mCharGen = new CharacterCreation();
|
||||||
|
|
||||||
// Setup player stats
|
// Setup player stats
|
||||||
for (int i = 0; i < ESM::Attribute::Length; ++i)
|
for (int i = 0; i < ESM::Attribute::Length; ++i)
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
|
|
||||||
using namespace MWGui;
|
using namespace MWGui;
|
||||||
|
|
||||||
WindowPinnableBase::WindowPinnableBase(const std::string& parLayout, MWBase::WindowManager& parWindowManager)
|
WindowPinnableBase::WindowPinnableBase(const std::string& parLayout)
|
||||||
: WindowBase(parLayout, parWindowManager), mPinned(false), mVisible(false)
|
: WindowBase(parLayout), mPinned(false), mVisible(false)
|
||||||
{
|
{
|
||||||
ExposedWindow* window = static_cast<ExposedWindow*>(mMainWidget);
|
ExposedWindow* window = static_cast<ExposedWindow*>(mMainWidget);
|
||||||
mPinButton = window->getSkinWidget ("Button");
|
mPinButton = window->getSkinWidget ("Button");
|
||||||
|
|
|
@ -10,7 +10,7 @@ namespace MWGui
|
||||||
class WindowPinnableBase: public WindowBase
|
class WindowPinnableBase: public WindowBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
WindowPinnableBase(const std::string& parLayout, MWBase::WindowManager& parWindowManager);
|
WindowPinnableBase(const std::string& parLayout);
|
||||||
bool pinned() { return mPinned; }
|
bool pinned() { return mPinned; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in a new issue