OpenMW
apps/openmw/mwgui/birth.hpp
Go to the documentation of this file.
00001 #ifndef MWGUI_BIRTH_H
00002 #define MWGUI_BIRTH_H
00003 
00004 #include "windowbase.hpp"
00005 
00006 /*
00007   This file contains the dialog for choosing a birth sign.
00008   Layout is defined by resources/mygui/openmw_chargen_race.layout.
00009  */
00010 
00011 namespace MWGui
00012 {
00013     class BirthDialog : public WindowModal
00014     {
00015     public:
00016         BirthDialog();
00017 
00018         enum Gender
00019         {
00020             GM_Male,
00021             GM_Female
00022         };
00023 
00024         const std::string &getBirthId() const { return mCurrentBirthId; }
00025         void setBirthId(const std::string &raceId);
00026 
00027         void setNextButtonShow(bool shown);
00028         virtual void open();
00029 
00030         // Events
00031         typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;
00032 
00036         EventHandle_Void eventBack;
00037 
00038     protected:
00039         void onSelectBirth(MyGUI::ListBox* _sender, size_t _index);
00040 
00041         void onOkClicked(MyGUI::Widget* _sender);
00042         void onBackClicked(MyGUI::Widget* _sender);
00043 
00044     private:
00045         void updateBirths();
00046         void updateSpells();
00047 
00048         MyGUI::ListBox* mBirthList;
00049         MyGUI::Widget*  mSpellArea;
00050         MyGUI::ImageBox* mBirthImage;
00051         std::vector<MyGUI::Widget*> mSpellItems;
00052 
00053         std::string mCurrentBirthId;
00054     };
00055 }
00056 #endif