1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-10 15:39:02 +00:00
OpenMW/apps/openmw/mwgui/charactercreation.hpp

120 lines
3.5 KiB
C++
Raw Normal View History

2012-01-30 17:27:49 +00:00
#ifndef CHARACTER_CREATION_HPP
#define CHARACTER_CREATION_HPP
2012-10-01 15:17:04 +00:00
#include "../mwworld/esmstore.hpp"
#include "../mwbase/world.hpp"
#include "../mwbase/windowmanager.hpp"
#include "../mwmechanics/stat.hpp"
2012-01-30 17:27:49 +00:00
namespace MWGui
{
class WindowBase;
2012-01-30 17:27:49 +00:00
class TextInputDialog;
class InfoBoxDialog;
class RaceDialog;
class DialogueWindow;
class ClassChoiceDialog;
class GenerateClassResultDialog;
class PickClassDialog;
class CreateClassDialog;
class BirthDialog;
class ReviewDialog;
class MessageBoxManager;
class CharacterCreation
{
public:
typedef std::vector<int> SkillList;
CharacterCreation(MWBase::WindowManager* _wm);
2012-01-30 17:27:49 +00:00
~CharacterCreation();
2012-01-30 17:27:49 +00:00
//Show a dialog
void spawnDialog(const char id);
2012-09-15 15:12:42 +00:00
void setPlayerHealth (const MWMechanics::DynamicStat<float>& value);
2012-09-15 15:12:42 +00:00
void setPlayerMagicka (const MWMechanics::DynamicStat<float>& value);
2012-09-15 15:12:42 +00:00
void setPlayerFatigue (const MWMechanics::DynamicStat<float>& value);
void setValue (const std::string& id, const MWMechanics::Stat<int>& value);
2012-09-15 15:12:42 +00:00
void setValue (const std::string& id, const MWMechanics::DynamicStat<float>& value);
void setValue(const ESM::Skill::SkillEnum parSkill, const MWMechanics::Stat<float>& value);
void configureSkills (const SkillList& major, const SkillList& minor);
2012-01-30 17:27:49 +00:00
private:
//Dialogs
TextInputDialog* mNameDialog;
RaceDialog* mRaceDialog;
ClassChoiceDialog* mClassChoiceDialog;
InfoBoxDialog* mGenerateClassQuestionDialog;
GenerateClassResultDialog* mGenerateClassResultDialog;
PickClassDialog* mPickClassDialog;
CreateClassDialog* mCreateClassDialog;
BirthDialog* mBirthSignDialog;
ReviewDialog* mReviewDialog;
MWBase::WindowManager* mWM;
2012-01-30 17:27:49 +00:00
//Player data
std::string mPlayerName;
std::string mPlayerRaceId;
std::string mPlayerBirthSignId;
ESM::Class mPlayerClass;
2012-09-15 15:12:42 +00:00
MWMechanics::DynamicStat<float> mPlayerHealth;
MWMechanics::DynamicStat<float> mPlayerMagicka;
MWMechanics::DynamicStat<float> mPlayerFatigue;
//Class generation vars
unsigned mGenerateClassStep; // Keeps track of current step in Generate Class dialog
unsigned mGenerateClassSpecializations[3]; // A counter for each specialization which is increased when an answer is chosen
std::string mGenerateClass; // In order: Stealth, Combat, Magic
2012-01-30 17:27:49 +00:00
////Dialog events
//Name dialog
void onNameDialogDone(WindowBase* parWindow);
2012-01-30 17:27:49 +00:00
//Race dialog
void onRaceDialogDone(WindowBase* parWindow);
void onRaceDialogBack();
//Class dialogs
2012-01-30 17:27:49 +00:00
void onClassChoice(int _index);
void onPickClassDialogDone(WindowBase* parWindow);
void onPickClassDialogBack();
void onCreateClassDialogDone(WindowBase* parWindow);
void onCreateClassDialogBack();
void showClassQuestionDialog();
void onClassQuestionChosen(int _index);
void onGenerateClassBack();
void onGenerateClassDone(WindowBase* parWindow);
//Birthsign dialog
void onBirthSignDialogDone(WindowBase* parWindow);
void onBirthSignDialogBack();
//Review dialog
void onReviewDialogDone(WindowBase* parWindow);
void onReviewDialogBack();
void onReviewActivateDialog(int parDialog);
enum CSE //Creation Stage Enum
2012-01-30 17:27:49 +00:00
{
CSE_NotStarted,
CSE_NameChosen,
CSE_RaceChosen,
CSE_ClassChosen,
CSE_BirthSignChosen,
CSE_ReviewNext
2012-01-30 17:27:49 +00:00
};
CSE mCreationStage; // Which state the character creating is in, controls back/next/ok buttons
};
2012-01-30 17:27:49 +00:00
}
#endif