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