|
|
|
@ -110,7 +110,6 @@ using namespace MWGui;
|
|
|
|
|
CharacterCreation::CharacterCreation(WindowManager* _wm)
|
|
|
|
|
: mNameDialog(0)
|
|
|
|
|
, mRaceDialog(0)
|
|
|
|
|
, mDialogueWindow(0)
|
|
|
|
|
, mClassChoiceDialog(0)
|
|
|
|
|
, mGenerateClassQuestionDialog(0)
|
|
|
|
|
, mGenerateClassResultDialog(0)
|
|
|
|
@ -253,7 +252,7 @@ void CharacterCreation::onReviewDialogDone(WindowBase* parWindow)
|
|
|
|
|
if (mReviewDialog)
|
|
|
|
|
mWM->removeDialog(mReviewDialog);
|
|
|
|
|
|
|
|
|
|
mWM->setGuiMode(GM_Game);
|
|
|
|
|
mWM->popGuiMode();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CharacterCreation::onReviewDialogBack()
|
|
|
|
@ -261,7 +260,7 @@ void CharacterCreation::onReviewDialogBack()
|
|
|
|
|
if (mReviewDialog)
|
|
|
|
|
mWM->removeDialog(mReviewDialog);
|
|
|
|
|
|
|
|
|
|
mWM->setGuiMode(GM_Birth);
|
|
|
|
|
mWM->pushGuiMode(GM_Birth);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CharacterCreation::onReviewActivateDialog(int parDialog)
|
|
|
|
@ -270,19 +269,21 @@ void CharacterCreation::onReviewActivateDialog(int parDialog)
|
|
|
|
|
mWM->removeDialog(mReviewDialog);
|
|
|
|
|
mCreationStage = CSE_ReviewNext;
|
|
|
|
|
|
|
|
|
|
mWM->popGuiMode();
|
|
|
|
|
|
|
|
|
|
switch(parDialog)
|
|
|
|
|
{
|
|
|
|
|
case ReviewDialog::NAME_DIALOG:
|
|
|
|
|
mWM->setGuiMode(GM_Name);
|
|
|
|
|
mWM->pushGuiMode(GM_Name);
|
|
|
|
|
break;
|
|
|
|
|
case ReviewDialog::RACE_DIALOG:
|
|
|
|
|
mWM->setGuiMode(GM_Race);
|
|
|
|
|
mWM->pushGuiMode(GM_Race);
|
|
|
|
|
break;
|
|
|
|
|
case ReviewDialog::CLASS_DIALOG:
|
|
|
|
|
mWM->setGuiMode(GM_Class);
|
|
|
|
|
mWM->pushGuiMode(GM_Class);
|
|
|
|
|
break;
|
|
|
|
|
case ReviewDialog::BIRTHSIGN_DIALOG:
|
|
|
|
|
mWM->setGuiMode(GM_Birth);
|
|
|
|
|
mWM->pushGuiMode(GM_Birth);
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -304,13 +305,19 @@ void CharacterCreation::onPickClassDialogDone(WindowBase* parWindow)
|
|
|
|
|
|
|
|
|
|
//TODO This bit gets repeated a few times; wrap it in a function
|
|
|
|
|
if (mCreationStage == CSE_ReviewNext)
|
|
|
|
|
mWM->setGuiMode(GM_Review);
|
|
|
|
|
{
|
|
|
|
|
mWM->popGuiMode();
|
|
|
|
|
mWM->pushGuiMode(GM_Review);
|
|
|
|
|
}
|
|
|
|
|
else if (mCreationStage >= CSE_ClassChosen)
|
|
|
|
|
mWM->setGuiMode(GM_Birth);
|
|
|
|
|
{
|
|
|
|
|
mWM->popGuiMode();
|
|
|
|
|
mWM->pushGuiMode(GM_Birth);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
mCreationStage = CSE_ClassChosen;
|
|
|
|
|
mWM->setGuiMode(GM_Game);
|
|
|
|
|
mWM->popGuiMode();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -324,7 +331,8 @@ void CharacterCreation::onPickClassDialogBack()
|
|
|
|
|
mWM->removeDialog(mPickClassDialog);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mWM->setGuiMode(GM_Class);
|
|
|
|
|
mWM->popGuiMode();
|
|
|
|
|
mWM->pushGuiMode(GM_Class);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CharacterCreation::onClassChoice(int _index)
|
|
|
|
@ -334,19 +342,21 @@ void CharacterCreation::onClassChoice(int _index)
|
|
|
|
|
mWM->removeDialog(mClassChoiceDialog);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mWM->popGuiMode();
|
|
|
|
|
|
|
|
|
|
switch(_index)
|
|
|
|
|
{
|
|
|
|
|
case ClassChoiceDialog::Class_Generate:
|
|
|
|
|
mWM->setGuiMode(GM_ClassGenerate);
|
|
|
|
|
mWM->pushGuiMode(GM_ClassGenerate);
|
|
|
|
|
break;
|
|
|
|
|
case ClassChoiceDialog::Class_Pick:
|
|
|
|
|
mWM->setGuiMode(GM_ClassPick);
|
|
|
|
|
mWM->pushGuiMode(GM_ClassPick);
|
|
|
|
|
break;
|
|
|
|
|
case ClassChoiceDialog::Class_Create:
|
|
|
|
|
mWM->setGuiMode(GM_ClassCreate);
|
|
|
|
|
mWM->pushGuiMode(GM_ClassCreate);
|
|
|
|
|
break;
|
|
|
|
|
case ClassChoiceDialog::Class_Back:
|
|
|
|
|
mWM->setGuiMode(GM_Race);
|
|
|
|
|
mWM->pushGuiMode(GM_Race);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
@ -363,13 +373,19 @@ void CharacterCreation::onNameDialogDone(WindowBase* parWindow)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (mCreationStage == CSE_ReviewNext)
|
|
|
|
|
mWM->setGuiMode(GM_Review);
|
|
|
|
|
{
|
|
|
|
|
mWM->popGuiMode();
|
|
|
|
|
mWM->pushGuiMode(GM_Review);
|
|
|
|
|
}
|
|
|
|
|
else if (mCreationStage >= CSE_NameChosen)
|
|
|
|
|
mWM->setGuiMode(GM_Race);
|
|
|
|
|
{
|
|
|
|
|
mWM->popGuiMode();
|
|
|
|
|
mWM->pushGuiMode(GM_Race);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
mCreationStage = CSE_NameChosen;
|
|
|
|
|
mWM->setGuiMode(GM_Game);
|
|
|
|
|
mWM->popGuiMode();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -383,7 +399,8 @@ void CharacterCreation::onRaceDialogBack()
|
|
|
|
|
mWM->removeDialog(mRaceDialog);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mWM->setGuiMode(GM_Name);
|
|
|
|
|
mWM->popGuiMode();
|
|
|
|
|
mWM->pushGuiMode(GM_Name);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CharacterCreation::onRaceDialogDone(WindowBase* parWindow)
|
|
|
|
@ -398,13 +415,19 @@ void CharacterCreation::onRaceDialogDone(WindowBase* parWindow)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (mCreationStage == CSE_ReviewNext)
|
|
|
|
|
mWM->setGuiMode(GM_Review);
|
|
|
|
|
else if(mCreationStage >= CSE_RaceChosen)
|
|
|
|
|
mWM->setGuiMode(GM_Class);
|
|
|
|
|
{
|
|
|
|
|
mWM->popGuiMode();
|
|
|
|
|
mWM->pushGuiMode(GM_Review);
|
|
|
|
|
}
|
|
|
|
|
else if (mCreationStage >= CSE_NameChosen)
|
|
|
|
|
{
|
|
|
|
|
mWM->popGuiMode();
|
|
|
|
|
mWM->pushGuiMode(GM_Class);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
mCreationStage = CSE_RaceChosen;
|
|
|
|
|
mWM->setGuiMode(GM_Game);
|
|
|
|
|
mCreationStage = CSE_NameChosen;
|
|
|
|
|
mWM->popGuiMode();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -419,11 +442,14 @@ void CharacterCreation::onBirthSignDialogDone(WindowBase* parWindow)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (mCreationStage >= CSE_BirthSignChosen)
|
|
|
|
|
mWM->setGuiMode(GM_Review);
|
|
|
|
|
{
|
|
|
|
|
mWM->popGuiMode();
|
|
|
|
|
mWM->pushGuiMode(GM_Review);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
mCreationStage = CSE_BirthSignChosen;
|
|
|
|
|
mWM->setGuiMode(GM_Game);
|
|
|
|
|
mWM->popGuiMode();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -435,7 +461,8 @@ void CharacterCreation::onBirthSignDialogBack()
|
|
|
|
|
mWM->removeDialog(mBirthSignDialog);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mWM->setGuiMode(GM_Class);
|
|
|
|
|
mWM->popGuiMode();
|
|
|
|
|
mWM->pushGuiMode(GM_Class);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CharacterCreation::onCreateClassDialogDone(WindowBase* parWindow)
|
|
|
|
@ -470,13 +497,19 @@ void CharacterCreation::onCreateClassDialogDone(WindowBase* parWindow)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (mCreationStage == CSE_ReviewNext)
|
|
|
|
|
mWM->setGuiMode(GM_Review);
|
|
|
|
|
{
|
|
|
|
|
mWM->popGuiMode();
|
|
|
|
|
mWM->pushGuiMode(GM_Review);
|
|
|
|
|
}
|
|
|
|
|
else if (mCreationStage >= CSE_ClassChosen)
|
|
|
|
|
mWM->setGuiMode(GM_Birth);
|
|
|
|
|
{
|
|
|
|
|
mWM->popGuiMode();
|
|
|
|
|
mWM->pushGuiMode(GM_Birth);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
mCreationStage = CSE_ClassChosen;
|
|
|
|
|
mWM->setGuiMode(GM_Game);
|
|
|
|
|
mWM->popGuiMode();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -485,7 +518,8 @@ void CharacterCreation::onCreateClassDialogBack()
|
|
|
|
|
if (mCreateClassDialog)
|
|
|
|
|
mWM->removeDialog(mCreateClassDialog);
|
|
|
|
|
|
|
|
|
|
mWM->setGuiMode(GM_Class);
|
|
|
|
|
mWM->popGuiMode();
|
|
|
|
|
mWM->pushGuiMode(GM_Class);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CharacterCreation::onClassQuestionChosen(int _index)
|
|
|
|
@ -496,7 +530,8 @@ void CharacterCreation::onClassQuestionChosen(int _index)
|
|
|
|
|
mWM->removeDialog(mGenerateClassQuestionDialog);
|
|
|
|
|
if (_index < 0 || _index >= 3)
|
|
|
|
|
{
|
|
|
|
|
mWM->setGuiMode(GM_Class);
|
|
|
|
|
mWM->popGuiMode();
|
|
|
|
|
mWM->pushGuiMode(GM_Class);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -581,7 +616,8 @@ void CharacterCreation::showClassQuestionDialog()
|
|
|
|
|
|
|
|
|
|
if (mGenerateClassStep > sGenerateClassSteps.size())
|
|
|
|
|
{
|
|
|
|
|
mWM->setGuiMode(GM_Class);
|
|
|
|
|
mWM->popGuiMode();
|
|
|
|
|
mWM->pushGuiMode(GM_Class);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -610,7 +646,8 @@ void CharacterCreation::onGenerateClassBack()
|
|
|
|
|
mWM->removeDialog(mGenerateClassResultDialog);
|
|
|
|
|
MWBase::Environment::get().getMechanicsManager()->setPlayerClass(mGenerateClass);
|
|
|
|
|
|
|
|
|
|
mWM->setGuiMode(GM_Class);
|
|
|
|
|
mWM->popGuiMode();
|
|
|
|
|
mWM->pushGuiMode(GM_Class);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CharacterCreation::onGenerateClassDone(WindowBase* parWindow)
|
|
|
|
@ -620,13 +657,19 @@ void CharacterCreation::onGenerateClassDone(WindowBase* parWindow)
|
|
|
|
|
MWBase::Environment::get().getMechanicsManager()->setPlayerClass(mGenerateClass);
|
|
|
|
|
|
|
|
|
|
if (mCreationStage == CSE_ReviewNext)
|
|
|
|
|
mWM->setGuiMode(GM_Review);
|
|
|
|
|
{
|
|
|
|
|
mWM->popGuiMode();
|
|
|
|
|
mWM->pushGuiMode(GM_Review);
|
|
|
|
|
}
|
|
|
|
|
else if (mCreationStage >= CSE_ClassChosen)
|
|
|
|
|
mWM->setGuiMode(GM_Birth);
|
|
|
|
|
{
|
|
|
|
|
mWM->popGuiMode();
|
|
|
|
|
mWM->pushGuiMode(GM_Birth);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
mCreationStage = CSE_ClassChosen;
|
|
|
|
|
mWM->setGuiMode(GM_Game);
|
|
|
|
|
mWM->popGuiMode();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -634,7 +677,6 @@ CharacterCreation::~CharacterCreation()
|
|
|
|
|
{
|
|
|
|
|
delete mNameDialog;
|
|
|
|
|
delete mRaceDialog;
|
|
|
|
|
delete mDialogueWindow;
|
|
|
|
|
delete mClassChoiceDialog;
|
|
|
|
|
delete mGenerateClassQuestionDialog;
|
|
|
|
|
delete mGenerateClassResultDialog;
|
|
|
|
|