2010-09-12 12:06:10 +00:00
|
|
|
#ifndef MWGUI_CHARGEN_H
|
|
|
|
#define MWGUI_CHARGEN_H
|
|
|
|
|
|
|
|
#include <components/esm_store/store.hpp>
|
|
|
|
|
|
|
|
#include <openengine/gui/layout.hpp>
|
|
|
|
|
|
|
|
#include <boost/array.hpp>
|
|
|
|
|
2010-09-14 12:16:26 +00:00
|
|
|
namespace MWWorld
|
|
|
|
{
|
|
|
|
class Environment;
|
|
|
|
}
|
|
|
|
|
2010-09-12 12:06:10 +00:00
|
|
|
/*
|
|
|
|
This file contains classes corresponding to all the dialogs
|
|
|
|
for the character generation, layouts are defined in resources/mygui/ *.xml.
|
|
|
|
|
|
|
|
Each class inherites GUI::Layout and loads the XML file, and
|
|
|
|
provides some helper functions to manipulate the elements of the
|
|
|
|
window.
|
|
|
|
|
|
|
|
The windows are never created or destroyed (except at startup and
|
|
|
|
shutdown), they are only hid. You can control visibility with
|
|
|
|
setVisible().
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace MWGui
|
|
|
|
{
|
|
|
|
using namespace MyGUI;
|
|
|
|
|
|
|
|
class RaceDialog : public OEngine::GUI::Layout
|
|
|
|
{
|
|
|
|
public:
|
2010-09-14 12:16:26 +00:00
|
|
|
RaceDialog(MWWorld::Environment& environment);
|
|
|
|
|
|
|
|
void setRace(const std::string &race);
|
2010-09-12 12:06:10 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
void onHeadRotate(MyGUI::VScroll* _sender, size_t _position);
|
|
|
|
|
2010-09-12 12:14:54 +00:00
|
|
|
void onSelectPreviousGender(MyGUI::Widget* _sender);
|
|
|
|
void onSelectNextGender(MyGUI::Widget* _sender);
|
2010-09-12 12:06:10 +00:00
|
|
|
|
|
|
|
void onSelectPreviousFace(MyGUI::Widget* _sender);
|
|
|
|
void onSelectNextFace(MyGUI::Widget* _sender);
|
|
|
|
|
|
|
|
void onSelectPreviousHair(MyGUI::Widget* _sender);
|
|
|
|
void onSelectNextHair(MyGUI::Widget* _sender);
|
|
|
|
|
|
|
|
void onSelectRace(MyGUI::List* _sender, size_t _index);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void updateRaces();
|
|
|
|
void updateSkills();
|
2010-09-12 12:14:54 +00:00
|
|
|
void updateSpellPowers();
|
2010-09-12 12:06:10 +00:00
|
|
|
|
2010-09-14 12:16:26 +00:00
|
|
|
MWWorld::Environment& environment;
|
|
|
|
|
2010-09-12 12:06:10 +00:00
|
|
|
MyGUI::CanvasPtr appearanceBox;
|
|
|
|
MyGUI::ListPtr raceList;
|
|
|
|
MyGUI::HScrollPtr headRotate;
|
|
|
|
|
|
|
|
MyGUI::WidgetPtr skillList;
|
|
|
|
std::vector<MyGUI::WidgetPtr> skillItems;
|
|
|
|
|
2010-09-12 12:14:54 +00:00
|
|
|
MyGUI::WidgetPtr spellPowerList;
|
|
|
|
std::vector<MyGUI::WidgetPtr> spellPowerItems;
|
2010-09-12 12:06:10 +00:00
|
|
|
|
2010-09-12 12:14:54 +00:00
|
|
|
int genderIndex, faceIndex, hairIndex;
|
2010-09-12 12:06:10 +00:00
|
|
|
int faceCount, hairCount;
|
2010-09-14 12:16:26 +00:00
|
|
|
|
|
|
|
std::string currentRace;
|
2010-09-12 12:06:10 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|