2012-01-30 17:27:49 +00:00
|
|
|
#ifndef CHARACTER_CREATION_HPP
|
|
|
|
#define CHARACTER_CREATION_HPP
|
|
|
|
|
2014-02-23 19:11:05 +00:00
|
|
|
#include <components/esm/loadskil.hpp>
|
|
|
|
#include <components/esm/loadclas.hpp>
|
|
|
|
|
2012-07-03 10:30:50 +00:00
|
|
|
#include "../mwbase/world.hpp"
|
2012-08-12 16:11:09 +00:00
|
|
|
#include "../mwbase/windowmanager.hpp"
|
2012-07-03 10:30:50 +00:00
|
|
|
|
2012-01-30 17:27:49 +00:00
|
|
|
namespace MWGui
|
|
|
|
{
|
|
|
|
class WindowBase;
|
2012-02-03 10:24:28 +00:00
|
|
|
|
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:
|
2012-01-30 19:53:17 +00:00
|
|
|
typedef std::vector<int> SkillList;
|
2012-02-03 10:24:28 +00:00
|
|
|
|
2013-04-10 18:46:21 +00:00
|
|
|
CharacterCreation();
|
2012-01-30 17:27:49 +00:00
|
|
|
~CharacterCreation();
|
2012-02-03 10:24:28 +00:00
|
|
|
|
2012-01-30 17:27:49 +00:00
|
|
|
//Show a dialog
|
|
|
|
void spawnDialog(const char id);
|
2012-02-03 10:24:28 +00:00
|
|
|
|
2014-01-03 00:59:15 +00:00
|
|
|
void setValue (const std::string& id, const MWMechanics::AttributeValue& value);
|
2012-09-15 15:12:42 +00:00
|
|
|
void setValue (const std::string& id, const MWMechanics::DynamicStat<float>& value);
|
2014-01-03 00:59:15 +00:00
|
|
|
void setValue(const ESM::Skill::SkillEnum parSkill, const MWMechanics::SkillValue& value);
|
2012-05-28 08:50:00 +00:00
|
|
|
void configureSkills (const SkillList& major, const SkillList& minor);
|
2013-07-06 15:02:40 +00:00
|
|
|
void doRenderUpdate();
|
2012-05-28 08:50:00 +00:00
|
|
|
|
2012-01-30 17:27:49 +00:00
|
|
|
private:
|
|
|
|
//Dialogs
|
2012-02-02 16:31:28 +00:00
|
|
|
TextInputDialog* mNameDialog;
|
|
|
|
RaceDialog* mRaceDialog;
|
|
|
|
ClassChoiceDialog* mClassChoiceDialog;
|
|
|
|
InfoBoxDialog* mGenerateClassQuestionDialog;
|
|
|
|
GenerateClassResultDialog* mGenerateClassResultDialog;
|
|
|
|
PickClassDialog* mPickClassDialog;
|
|
|
|
CreateClassDialog* mCreateClassDialog;
|
|
|
|
BirthDialog* mBirthSignDialog;
|
|
|
|
ReviewDialog* mReviewDialog;
|
2012-02-03 10:24:28 +00:00
|
|
|
|
2012-01-30 17:27:49 +00:00
|
|
|
//Player data
|
2012-02-02 16:31:28 +00:00
|
|
|
std::string mPlayerName;
|
|
|
|
std::string mPlayerRaceId;
|
|
|
|
std::string mPlayerBirthSignId;
|
|
|
|
ESM::Class mPlayerClass;
|
2012-02-03 10:24:28 +00:00
|
|
|
|
2012-01-30 19:53:17 +00:00
|
|
|
//Class generation vars
|
2012-02-02 16:31:28 +00:00
|
|
|
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-02-03 10:24:28 +00:00
|
|
|
|
2012-01-30 17:27:49 +00:00
|
|
|
////Dialog events
|
|
|
|
//Name dialog
|
|
|
|
void onNameDialogDone(WindowBase* parWindow);
|
2012-02-03 10:24:28 +00:00
|
|
|
|
2012-01-30 17:27:49 +00:00
|
|
|
//Race dialog
|
|
|
|
void onRaceDialogDone(WindowBase* parWindow);
|
|
|
|
void onRaceDialogBack();
|
2012-02-03 10:24:28 +00:00
|
|
|
|
2012-01-30 19:53:17 +00:00
|
|
|
//Class dialogs
|
2012-01-30 17:27:49 +00:00
|
|
|
void onClassChoice(int _index);
|
|
|
|
void onPickClassDialogDone(WindowBase* parWindow);
|
|
|
|
void onPickClassDialogBack();
|
2012-01-30 19:53:17 +00:00
|
|
|
void onCreateClassDialogDone(WindowBase* parWindow);
|
|
|
|
void onCreateClassDialogBack();
|
|
|
|
void showClassQuestionDialog();
|
|
|
|
void onClassQuestionChosen(int _index);
|
|
|
|
void onGenerateClassBack();
|
|
|
|
void onGenerateClassDone(WindowBase* parWindow);
|
2012-02-03 10:24:28 +00:00
|
|
|
|
2012-01-30 19:53:17 +00:00
|
|
|
//Birthsign dialog
|
|
|
|
void onBirthSignDialogDone(WindowBase* parWindow);
|
|
|
|
void onBirthSignDialogBack();
|
2012-02-03 10:24:28 +00:00
|
|
|
|
2012-01-30 19:53:17 +00:00
|
|
|
//Review dialog
|
|
|
|
void onReviewDialogDone(WindowBase* parWindow);
|
|
|
|
void onReviewDialogBack();
|
|
|
|
void onReviewActivateDialog(int parDialog);
|
2012-02-03 10:24:28 +00:00
|
|
|
|
2012-02-02 16:31:28 +00:00
|
|
|
enum CSE //Creation Stage Enum
|
2012-01-30 17:27:49 +00:00
|
|
|
{
|
2012-02-02 16:31:28 +00:00
|
|
|
CSE_NotStarted,
|
|
|
|
CSE_NameChosen,
|
|
|
|
CSE_RaceChosen,
|
|
|
|
CSE_ClassChosen,
|
|
|
|
CSE_BirthSignChosen,
|
2013-11-06 01:39:43 +00:00
|
|
|
CSE_ReviewBack,
|
2012-02-02 16:31:28 +00:00
|
|
|
CSE_ReviewNext
|
2012-01-30 17:27:49 +00:00
|
|
|
};
|
|
|
|
|
2012-02-02 16:31:28 +00:00
|
|
|
CSE mCreationStage; // Which state the character creating is in, controls back/next/ok buttons
|
2012-01-30 19:53:17 +00:00
|
|
|
};
|
2012-01-30 17:27:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|