2010-09-21 10:34:47 +00:00
|
|
|
#ifndef MWGUI_BIRTH_H
|
|
|
|
#define MWGUI_BIRTH_H
|
|
|
|
|
2013-04-10 04:32:05 +00:00
|
|
|
#include "windowbase.hpp"
|
2010-09-21 10:34:47 +00:00
|
|
|
|
|
|
|
namespace MWGui
|
|
|
|
{
|
2013-02-25 05:57:32 +00:00
|
|
|
class BirthDialog : public WindowModal
|
2010-09-21 10:34:47 +00:00
|
|
|
{
|
|
|
|
public:
|
2013-04-10 18:46:21 +00:00
|
|
|
BirthDialog();
|
2010-09-21 10:34:47 +00:00
|
|
|
|
|
|
|
enum Gender
|
|
|
|
{
|
|
|
|
GM_Male,
|
|
|
|
GM_Female
|
|
|
|
};
|
|
|
|
|
2012-07-13 10:51:58 +00:00
|
|
|
const std::string &getBirthId() const { return mCurrentBirthId; }
|
2010-09-21 10:34:47 +00:00
|
|
|
void setBirthId(const std::string &raceId);
|
|
|
|
|
|
|
|
void setNextButtonShow(bool shown);
|
2012-08-27 19:29:04 +00:00
|
|
|
virtual void open();
|
2010-09-21 10:34:47 +00:00
|
|
|
|
|
|
|
// Events
|
2012-09-10 07:10:50 +00:00
|
|
|
typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;
|
2010-09-21 10:34:47 +00:00
|
|
|
|
|
|
|
/** Event : Back button clicked.\n
|
|
|
|
signature : void method()\n
|
|
|
|
*/
|
|
|
|
EventHandle_Void eventBack;
|
|
|
|
|
2014-09-07 01:21:24 +00:00
|
|
|
/** Event : Dialog finished, OK button clicked.\n
|
|
|
|
signature : void method()\n
|
|
|
|
*/
|
|
|
|
EventHandle_WindowBase eventDone;
|
|
|
|
|
2010-09-21 10:34:47 +00:00
|
|
|
protected:
|
2012-03-22 14:28:06 +00:00
|
|
|
void onSelectBirth(MyGUI::ListBox* _sender, size_t _index);
|
2010-09-21 10:34:47 +00:00
|
|
|
|
2014-01-28 19:12:37 +00:00
|
|
|
void onAccept(MyGUI::ListBox* _sender, size_t index);
|
2010-09-21 10:34:47 +00:00
|
|
|
void onOkClicked(MyGUI::Widget* _sender);
|
|
|
|
void onBackClicked(MyGUI::Widget* _sender);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void updateBirths();
|
|
|
|
void updateSpells();
|
|
|
|
|
2012-07-13 10:51:58 +00:00
|
|
|
MyGUI::ListBox* mBirthList;
|
2013-03-03 12:11:02 +00:00
|
|
|
MyGUI::Widget* mSpellArea;
|
2012-07-13 10:51:58 +00:00
|
|
|
MyGUI::ImageBox* mBirthImage;
|
2013-03-03 12:11:02 +00:00
|
|
|
std::vector<MyGUI::Widget*> mSpellItems;
|
2010-09-21 10:34:47 +00:00
|
|
|
|
2012-07-13 10:51:58 +00:00
|
|
|
std::string mCurrentBirthId;
|
2010-09-21 10:34:47 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|