forked from mirror/openmw-tes3mp
fix an infinite recursion regression on several dialogs.
This commit is contained in:
parent
5c28a67203
commit
321f7c3419
13 changed files with 17 additions and 36 deletions
|
@ -65,9 +65,9 @@ void BirthDialog::setNextButtonShow(bool shown)
|
|||
|
||||
void BirthDialog::open()
|
||||
{
|
||||
WindowBase::open();
|
||||
updateBirths();
|
||||
updateSpells();
|
||||
setVisible(true);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace MWGui
|
|||
void setBirthId(const std::string &raceId);
|
||||
|
||||
void setNextButtonShow(bool shown);
|
||||
void open();
|
||||
virtual void open();
|
||||
|
||||
// Events
|
||||
typedef delegates::CMultiDelegate0 EventHandle_Void;
|
||||
|
|
|
@ -194,7 +194,7 @@ void CharacterCreation::spawnDialog(const char id)
|
|||
mNameDialog->setTextInput(mPlayerName);
|
||||
mNameDialog->setNextButtonShow(mCreationStage >= CSE_NameChosen);
|
||||
mNameDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onNameDialogDone);
|
||||
mNameDialog->open();
|
||||
mNameDialog->setVisible(true);
|
||||
break;
|
||||
|
||||
case GM_Race:
|
||||
|
@ -205,7 +205,7 @@ void CharacterCreation::spawnDialog(const char id)
|
|||
mRaceDialog->setRaceId(mPlayerRaceId);
|
||||
mRaceDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onRaceDialogDone);
|
||||
mRaceDialog->eventBack += MyGUI::newDelegate(this, &CharacterCreation::onRaceDialogBack);
|
||||
mRaceDialog->open();
|
||||
mRaceDialog->setVisible(true);;
|
||||
break;
|
||||
|
||||
case GM_Class:
|
||||
|
@ -213,7 +213,7 @@ void CharacterCreation::spawnDialog(const char id)
|
|||
mClassChoiceDialog = 0;
|
||||
mClassChoiceDialog = new ClassChoiceDialog(*mWM);
|
||||
mClassChoiceDialog->eventButtonSelected += MyGUI::newDelegate(this, &CharacterCreation::onClassChoice);
|
||||
mClassChoiceDialog->open();
|
||||
mClassChoiceDialog->setVisible(true);
|
||||
break;
|
||||
|
||||
case GM_ClassPick:
|
||||
|
@ -224,7 +224,7 @@ void CharacterCreation::spawnDialog(const char id)
|
|||
mPickClassDialog->setClassId(mPlayerClass.name);
|
||||
mPickClassDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onPickClassDialogDone);
|
||||
mPickClassDialog->eventBack += MyGUI::newDelegate(this, &CharacterCreation::onPickClassDialogBack);
|
||||
mPickClassDialog->open();
|
||||
mPickClassDialog->setVisible(true);
|
||||
break;
|
||||
|
||||
case GM_Birth:
|
||||
|
@ -234,7 +234,7 @@ void CharacterCreation::spawnDialog(const char id)
|
|||
mBirthSignDialog->setNextButtonShow(mCreationStage >= CSE_BirthSignChosen);
|
||||
mBirthSignDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onBirthSignDialogDone);
|
||||
mBirthSignDialog->eventBack += MyGUI::newDelegate(this, &CharacterCreation::onBirthSignDialogBack);
|
||||
mBirthSignDialog->open();
|
||||
mBirthSignDialog->setVisible(true);
|
||||
break;
|
||||
|
||||
case GM_ClassCreate:
|
||||
|
@ -244,7 +244,7 @@ void CharacterCreation::spawnDialog(const char id)
|
|||
mCreateClassDialog->setNextButtonShow(mCreationStage >= CSE_ClassChosen);
|
||||
mCreateClassDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onCreateClassDialogDone);
|
||||
mCreateClassDialog->eventBack += MyGUI::newDelegate(this, &CharacterCreation::onCreateClassDialogBack);
|
||||
mCreateClassDialog->open();
|
||||
mCreateClassDialog->setVisible(true);
|
||||
break;
|
||||
case GM_ClassGenerate:
|
||||
mGenerateClassStep = 0;
|
||||
|
@ -289,7 +289,7 @@ void CharacterCreation::spawnDialog(const char id)
|
|||
mReviewDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onReviewDialogDone);
|
||||
mReviewDialog->eventBack += MyGUI::newDelegate(this, &CharacterCreation::onReviewDialogBack);
|
||||
mReviewDialog->eventActivateDialog += MyGUI::newDelegate(this, &CharacterCreation::onReviewActivateDialog);
|
||||
mReviewDialog->open();
|
||||
mReviewDialog->setVisible(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -680,7 +680,7 @@ void CharacterCreation::showClassQuestionDialog()
|
|||
mGenerateClassResultDialog->setClassId(mGenerateClass);
|
||||
mGenerateClassResultDialog->eventBack += MyGUI::newDelegate(this, &CharacterCreation::onGenerateClassBack);
|
||||
mGenerateClassResultDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onGenerateClassDone);
|
||||
mGenerateClassResultDialog->open();
|
||||
mGenerateClassResultDialog->setVisible(true);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -703,7 +703,7 @@ void CharacterCreation::showClassQuestionDialog()
|
|||
buttons.push_back(sGenerateClassSteps[mGenerateClassStep].mButtons[2]);
|
||||
mGenerateClassQuestionDialog->setButtons(buttons);
|
||||
mGenerateClassQuestionDialog->eventButtonSelected += MyGUI::newDelegate(this, &CharacterCreation::onClassQuestionChosen);
|
||||
mGenerateClassQuestionDialog->open();
|
||||
mGenerateClassQuestionDialog->setVisible(true);
|
||||
|
||||
MWBase::Environment::get().getSoundManager()->say(sGenerateClassSteps[mGenerateClassStep].mSound);
|
||||
}
|
||||
|
|
|
@ -46,11 +46,6 @@ GenerateClassResultDialog::GenerateClassResultDialog(MWBase::WindowManager& parW
|
|||
backButton->setCoord(315 - okButtonWidth - backButtonWidth - 6, 219, backButtonWidth, 23);
|
||||
}
|
||||
|
||||
void GenerateClassResultDialog::open()
|
||||
{
|
||||
setVisible(true);
|
||||
}
|
||||
|
||||
std::string GenerateClassResultDialog::getClassId() const
|
||||
{
|
||||
return mClassName->getCaption();
|
||||
|
@ -143,7 +138,6 @@ void PickClassDialog::open()
|
|||
{
|
||||
updateClasses();
|
||||
updateStats();
|
||||
setVisible(true);
|
||||
}
|
||||
|
||||
|
||||
|
@ -341,7 +335,6 @@ void InfoBoxDialog::open()
|
|||
layoutVertically(mMainWidget, 4 + 6);
|
||||
|
||||
center();
|
||||
setVisible(true);
|
||||
}
|
||||
|
||||
int InfoBoxDialog::getChosenButton() const
|
||||
|
@ -549,11 +542,6 @@ void CreateClassDialog::setNextButtonShow(bool shown)
|
|||
descriptionButton->setCoord(459 - okButtonWidth - backButtonWidth - descriptionButtonWidth - 12, 158, descriptionButtonWidth, 23);
|
||||
}
|
||||
|
||||
void CreateClassDialog::open()
|
||||
{
|
||||
setVisible(true);
|
||||
}
|
||||
|
||||
// widget controls
|
||||
|
||||
void CreateClassDialog::onDialogCancel()
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace MWGui
|
|||
std::string getText() const;
|
||||
void setButtons(ButtonList &buttons);
|
||||
|
||||
void open();
|
||||
virtual void open();
|
||||
int getChosenButton() const;
|
||||
|
||||
// Events
|
||||
|
@ -74,8 +74,6 @@ namespace MWGui
|
|||
std::string getClassId() const;
|
||||
void setClassId(const std::string &classId);
|
||||
|
||||
void open();
|
||||
|
||||
// Events
|
||||
typedef delegates::CMultiDelegate0 EventHandle_Void;
|
||||
|
||||
|
@ -104,7 +102,7 @@ namespace MWGui
|
|||
void setClassId(const std::string &classId);
|
||||
|
||||
void setNextButtonShow(bool shown);
|
||||
void open();
|
||||
virtual void open();
|
||||
|
||||
// Events
|
||||
typedef delegates::CMultiDelegate0 EventHandle_Void;
|
||||
|
@ -264,7 +262,6 @@ namespace MWGui
|
|||
std::vector<ESM::Skill::SkillEnum> getMinorSkills() const;
|
||||
|
||||
void setNextButtonShow(bool shown);
|
||||
void open();
|
||||
|
||||
// Events
|
||||
typedef delegates::CMultiDelegate0 EventHandle_Void;
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace MWGui
|
|||
{
|
||||
public:
|
||||
JournalWindow(MWBase::WindowManager& parWindowManager);
|
||||
void open();
|
||||
virtual void open();
|
||||
|
||||
virtual void setVisible(bool visible); // only used to play close sound
|
||||
|
||||
|
|
|
@ -113,7 +113,6 @@ void RaceDialog::open()
|
|||
updateRaces();
|
||||
updateSkills();
|
||||
updateSpellPowers();
|
||||
setVisible(true);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace MWGui
|
|||
// setHair()
|
||||
|
||||
void setNextButtonShow(bool shown);
|
||||
void open();
|
||||
virtual void open();
|
||||
|
||||
// Events
|
||||
typedef delegates::CMultiDelegate0 EventHandle_Void;
|
||||
|
|
|
@ -110,7 +110,6 @@ ReviewDialog::ReviewDialog(MWBase::WindowManager& parWindowManager)
|
|||
void ReviewDialog::open()
|
||||
{
|
||||
updateSkillArea();
|
||||
setVisible(true);
|
||||
}
|
||||
|
||||
void ReviewDialog::onScrollChangePosition(MyGUI::ScrollBar* scroller, size_t pos)
|
||||
|
|
|
@ -46,7 +46,7 @@ namespace MWGui
|
|||
void configureSkills(const SkillList& major, const SkillList& minor);
|
||||
void setSkillValue(ESM::Skill::SkillEnum skillId, const MWMechanics::Stat<float>& value);
|
||||
|
||||
void open();
|
||||
virtual void open();
|
||||
|
||||
// Events
|
||||
typedef delegates::CMultiDelegate0 EventHandle_Void;
|
||||
|
|
|
@ -45,7 +45,6 @@ void TextInputDialog::open()
|
|||
{
|
||||
// Make sure the edit box has focus
|
||||
MyGUI::InputManager::getInstance().setKeyFocusWidget(mTextEdit);
|
||||
setVisible(true);
|
||||
}
|
||||
|
||||
// widget controls
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace MWGui
|
|||
|
||||
void setNextButtonShow(bool shown);
|
||||
void setTextLabel(const std::string &label);
|
||||
void open();
|
||||
virtual void open();
|
||||
|
||||
protected:
|
||||
void onOkClicked(MyGUI::Widget* _sender);
|
||||
|
|
|
@ -318,7 +318,6 @@ void WindowManager::updateVisible()
|
|||
break;
|
||||
case GM_Journal:
|
||||
mJournal->setVisible(true);
|
||||
mJournal->open();
|
||||
break;
|
||||
default:
|
||||
// Unsupported mode, switch back to game
|
||||
|
|
Loading…
Reference in a new issue