2010-09-19 04:29:22 +02:00
|
|
|
#ifndef MWGUI_CLASS_H
|
|
|
|
#define MWGUI_CLASS_H
|
|
|
|
|
2022-07-20 22:13:33 +02:00
|
|
|
#include <memory>
|
|
|
|
|
2022-06-04 15:26:36 +02:00
|
|
|
#include <MyGUI_EditBox.h>
|
|
|
|
|
2014-12-19 11:26:54 +01:00
|
|
|
#include <components/esm/attr.hpp>
|
Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID
Slowly going through all the changes to make, still hundreds of errors
a lot of functions/structures use std::string or stringview to designate an ID. So it takes time
Continues slowly replacing ids. There are technically more and more compilation errors
I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type
Continue moving forward, changes to the stores
slowly moving along
Starting to see the fruit of those changes.
still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.
More replacements. Things are starting to get easier
I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.
Still moving forward, and for the first time error count is going down!
Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably
Cells are back to using string for the name, haven't fixed everything yet. Many other changes
Under the bar of 400 compilation errors.
more good progress <100 compile errors!
More progress
Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string
some more progress on other fronts
Mostly game settings clean
one error opened a lot of other errors. Down to 18, but more will prbably appear
only link errors left??
Fixed link errors
OpenMW compiles, and launches, with some issues, but still!
2022-09-25 13:17:09 +02:00
|
|
|
#include <components/esm/refid.hpp>
|
2022-01-22 15:58:41 +01:00
|
|
|
#include <components/esm3/loadclas.hpp>
|
2022-06-04 15:26:36 +02:00
|
|
|
|
2010-09-20 13:17:02 +02:00
|
|
|
#include "widgets.hpp"
|
2013-04-10 00:32:05 -04:00
|
|
|
#include "windowbase.hpp"
|
2010-09-20 13:17:02 +02:00
|
|
|
|
2010-09-19 04:29:22 +02:00
|
|
|
namespace MWGui
|
|
|
|
{
|
Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID
Slowly going through all the changes to make, still hundreds of errors
a lot of functions/structures use std::string or stringview to designate an ID. So it takes time
Continues slowly replacing ids. There are technically more and more compilation errors
I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type
Continue moving forward, changes to the stores
slowly moving along
Starting to see the fruit of those changes.
still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.
More replacements. Things are starting to get easier
I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.
Still moving forward, and for the first time error count is going down!
Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably
Cells are back to using string for the name, haven't fixed everything yet. Many other changes
Under the bar of 400 compilation errors.
more good progress <100 compile errors!
More progress
Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string
some more progress on other fronts
Mostly game settings clean
one error opened a lot of other errors. Down to 18, but more will prbably appear
only link errors left??
Fixed link errors
OpenMW compiles, and launches, with some issues, but still!
2022-09-25 13:17:09 +02:00
|
|
|
void setClassImage(MyGUI::ImageBox* imageBox, const ESM::RefId& classId);
|
2016-03-24 16:52:16 +01:00
|
|
|
|
2013-02-25 06:57:32 +01:00
|
|
|
class InfoBoxDialog : public WindowModal
|
2010-10-10 00:42:56 +02:00
|
|
|
{
|
|
|
|
public:
|
2013-04-10 14:46:21 -04:00
|
|
|
InfoBoxDialog();
|
2010-10-10 00:42:56 +02:00
|
|
|
|
|
|
|
typedef std::vector<std::string> ButtonList;
|
|
|
|
|
|
|
|
void setText(const std::string& str);
|
|
|
|
std::string getText() const;
|
|
|
|
void setButtons(ButtonList& buttons);
|
|
|
|
|
2020-10-16 22:18:54 +04:00
|
|
|
void onOpen() override;
|
2010-10-10 00:42:56 +02:00
|
|
|
|
2020-10-16 22:18:54 +04:00
|
|
|
bool exit() override { return false; }
|
2017-09-23 12:18:39 +02:00
|
|
|
|
2010-10-10 00:42:56 +02:00
|
|
|
// Events
|
2012-09-10 09:10:50 +02:00
|
|
|
typedef MyGUI::delegates::CMultiDelegate1<int> EventHandle_Int;
|
2010-10-10 00:42:56 +02:00
|
|
|
|
|
|
|
/** Event : Button was clicked.\n
|
2012-05-15 12:51:51 +02:00
|
|
|
signature : void method(int index)\n
|
2010-10-10 00:42:56 +02:00
|
|
|
*/
|
2011-01-02 16:23:35 +01:00
|
|
|
EventHandle_Int eventButtonSelected;
|
2010-10-10 00:42:56 +02:00
|
|
|
|
|
|
|
protected:
|
2013-03-03 13:11:02 +01:00
|
|
|
void onButtonClicked(MyGUI::Widget* _sender);
|
2010-10-10 00:42:56 +02:00
|
|
|
|
|
|
|
private:
|
2012-03-21 14:54:02 +01:00
|
|
|
void fitToText(MyGUI::TextBox* widget);
|
2013-03-03 13:11:02 +01:00
|
|
|
void layoutVertically(MyGUI::Widget* widget, int margin);
|
|
|
|
MyGUI::Widget* mTextBox;
|
2012-07-13 03:51:58 -07:00
|
|
|
MyGUI::TextBox* mText;
|
2013-03-03 13:11:02 +01:00
|
|
|
MyGUI::Widget* mButtonBar;
|
|
|
|
std::vector<MyGUI::Button*> mButtons;
|
2010-10-10 00:42:56 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
// Lets the player choose between 3 ways of creating a class
|
|
|
|
class ClassChoiceDialog : public InfoBoxDialog
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
// Corresponds to the buttons that can be clicked
|
|
|
|
enum ClassChoice
|
|
|
|
{
|
|
|
|
Class_Generate = 0,
|
|
|
|
Class_Pick = 1,
|
|
|
|
Class_Create = 2,
|
|
|
|
Class_Back = 3
|
|
|
|
};
|
2013-04-10 14:46:21 -04:00
|
|
|
ClassChoiceDialog();
|
2010-10-10 00:42:56 +02:00
|
|
|
};
|
|
|
|
|
2013-02-25 06:57:32 +01:00
|
|
|
class GenerateClassResultDialog : public WindowModal
|
2010-10-10 01:52:08 +02:00
|
|
|
{
|
|
|
|
public:
|
2013-04-10 14:46:21 -04:00
|
|
|
GenerateClassResultDialog();
|
2010-10-10 01:52:08 +02:00
|
|
|
|
Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID
Slowly going through all the changes to make, still hundreds of errors
a lot of functions/structures use std::string or stringview to designate an ID. So it takes time
Continues slowly replacing ids. There are technically more and more compilation errors
I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type
Continue moving forward, changes to the stores
slowly moving along
Starting to see the fruit of those changes.
still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.
More replacements. Things are starting to get easier
I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.
Still moving forward, and for the first time error count is going down!
Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably
Cells are back to using string for the name, haven't fixed everything yet. Many other changes
Under the bar of 400 compilation errors.
more good progress <100 compile errors!
More progress
Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string
some more progress on other fronts
Mostly game settings clean
one error opened a lot of other errors. Down to 18, but more will prbably appear
only link errors left??
Fixed link errors
OpenMW compiles, and launches, with some issues, but still!
2022-09-25 13:17:09 +02:00
|
|
|
void setClassId(const ESM::RefId& classId);
|
2010-10-10 01:52:08 +02:00
|
|
|
|
2020-10-16 22:18:54 +04:00
|
|
|
bool exit() override { return false; }
|
2017-09-23 12:18:39 +02:00
|
|
|
|
2010-10-10 01:52:08 +02:00
|
|
|
// Events
|
2012-09-10 09:10:50 +02:00
|
|
|
typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;
|
2010-10-10 01:52:08 +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-10-10 01:52:08 +02:00
|
|
|
protected:
|
|
|
|
void onOkClicked(MyGUI::Widget* _sender);
|
|
|
|
void onBackClicked(MyGUI::Widget* _sender);
|
|
|
|
|
|
|
|
private:
|
2012-07-13 03:51:58 -07:00
|
|
|
MyGUI::ImageBox* mClassImage;
|
|
|
|
MyGUI::TextBox* mClassName;
|
2010-10-10 01:52:08 +02:00
|
|
|
|
Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID
Slowly going through all the changes to make, still hundreds of errors
a lot of functions/structures use std::string or stringview to designate an ID. So it takes time
Continues slowly replacing ids. There are technically more and more compilation errors
I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type
Continue moving forward, changes to the stores
slowly moving along
Starting to see the fruit of those changes.
still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.
More replacements. Things are starting to get easier
I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.
Still moving forward, and for the first time error count is going down!
Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably
Cells are back to using string for the name, haven't fixed everything yet. Many other changes
Under the bar of 400 compilation errors.
more good progress <100 compile errors!
More progress
Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string
some more progress on other fronts
Mostly game settings clean
one error opened a lot of other errors. Down to 18, but more will prbably appear
only link errors left??
Fixed link errors
OpenMW compiles, and launches, with some issues, but still!
2022-09-25 13:17:09 +02:00
|
|
|
ESM::RefId mCurrentClassId;
|
2010-10-10 01:52:08 +02:00
|
|
|
};
|
|
|
|
|
2013-02-25 06:57:32 +01:00
|
|
|
class PickClassDialog : public WindowModal
|
2010-09-19 04:29:22 +02:00
|
|
|
{
|
|
|
|
public:
|
2013-04-10 14:46:21 -04:00
|
|
|
PickClassDialog();
|
2010-09-19 04:29:22 +02:00
|
|
|
|
Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID
Slowly going through all the changes to make, still hundreds of errors
a lot of functions/structures use std::string or stringview to designate an ID. So it takes time
Continues slowly replacing ids. There are technically more and more compilation errors
I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type
Continue moving forward, changes to the stores
slowly moving along
Starting to see the fruit of those changes.
still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.
More replacements. Things are starting to get easier
I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.
Still moving forward, and for the first time error count is going down!
Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably
Cells are back to using string for the name, haven't fixed everything yet. Many other changes
Under the bar of 400 compilation errors.
more good progress <100 compile errors!
More progress
Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string
some more progress on other fronts
Mostly game settings clean
one error opened a lot of other errors. Down to 18, but more will prbably appear
only link errors left??
Fixed link errors
OpenMW compiles, and launches, with some issues, but still!
2022-09-25 13:17:09 +02:00
|
|
|
const ESM::RefId& getClassId() const { return mCurrentClassId; }
|
|
|
|
void setClassId(const ESM::RefId& classId);
|
2010-09-19 04:29:22 +02:00
|
|
|
|
|
|
|
void setNextButtonShow(bool shown);
|
2020-10-16 22:18:54 +04:00
|
|
|
void onOpen() override;
|
2010-09-19 04:29:22 +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-19 04:29:22 +02:00
|
|
|
// Events
|
2012-09-10 09:10:50 +02:00
|
|
|
typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;
|
2010-09-19 04:29:22 +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-19 04:29:22 +02:00
|
|
|
protected:
|
2012-03-22 15:28:06 +01:00
|
|
|
void onSelectClass(MyGUI::ListBox* _sender, size_t _index);
|
2014-01-28 20:12:37 +01:00
|
|
|
void onAccept(MyGUI::ListBox* _sender, size_t _index);
|
2010-09-19 04:29:22 +02:00
|
|
|
|
|
|
|
void onOkClicked(MyGUI::Widget* _sender);
|
|
|
|
void onBackClicked(MyGUI::Widget* _sender);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void updateClasses();
|
|
|
|
void updateStats();
|
|
|
|
|
2012-07-13 03:51:58 -07:00
|
|
|
MyGUI::ImageBox* mClassImage;
|
|
|
|
MyGUI::ListBox* mClassList;
|
|
|
|
MyGUI::TextBox* mSpecializationName;
|
|
|
|
Widgets::MWAttributePtr mFavoriteAttribute[2];
|
|
|
|
Widgets::MWSkillPtr mMajorSkill[5];
|
|
|
|
Widgets::MWSkillPtr mMinorSkill[5];
|
2010-09-19 04:29:22 +02:00
|
|
|
|
Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID
Slowly going through all the changes to make, still hundreds of errors
a lot of functions/structures use std::string or stringview to designate an ID. So it takes time
Continues slowly replacing ids. There are technically more and more compilation errors
I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type
Continue moving forward, changes to the stores
slowly moving along
Starting to see the fruit of those changes.
still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.
More replacements. Things are starting to get easier
I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.
Still moving forward, and for the first time error count is going down!
Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably
Cells are back to using string for the name, haven't fixed everything yet. Many other changes
Under the bar of 400 compilation errors.
more good progress <100 compile errors!
More progress
Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string
some more progress on other fronts
Mostly game settings clean
one error opened a lot of other errors. Down to 18, but more will prbably appear
only link errors left??
Fixed link errors
OpenMW compiles, and launches, with some issues, but still!
2022-09-25 13:17:09 +02:00
|
|
|
ESM::RefId mCurrentClassId;
|
2010-09-19 04:29:22 +02:00
|
|
|
};
|
2010-09-22 20:59:13 +02:00
|
|
|
|
2012-08-26 10:52:06 +02:00
|
|
|
class SelectSpecializationDialog : public WindowModal
|
2010-09-24 15:28:14 +02:00
|
|
|
{
|
|
|
|
public:
|
2013-04-10 14:46:21 -04:00
|
|
|
SelectSpecializationDialog();
|
2012-05-27 06:39:10 +02:00
|
|
|
~SelectSpecializationDialog();
|
2010-09-24 15:28:14 +02:00
|
|
|
|
2020-10-16 22:18:54 +04:00
|
|
|
bool exit() override;
|
2014-05-27 14:30:26 -04:00
|
|
|
|
2012-07-13 03:51:58 -07:00
|
|
|
ESM::Class::Specialization getSpecializationId() const { return mSpecializationId; }
|
2010-09-24 15:28:14 +02:00
|
|
|
|
|
|
|
// Events
|
2012-09-10 09:10:50 +02:00
|
|
|
typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;
|
2010-09-24 15:28:14 +02:00
|
|
|
|
|
|
|
/** Event : Cancel button clicked.\n
|
|
|
|
signature : void method()\n
|
|
|
|
*/
|
|
|
|
EventHandle_Void eventCancel;
|
|
|
|
|
|
|
|
/** Event : Dialog finished, specialization selected.\n
|
|
|
|
signature : void method()\n
|
|
|
|
*/
|
|
|
|
EventHandle_Void eventItemSelected;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void onSpecializationClicked(MyGUI::Widget* _sender);
|
|
|
|
void onCancelClicked(MyGUI::Widget* _sender);
|
|
|
|
|
|
|
|
private:
|
2012-07-13 03:51:58 -07:00
|
|
|
MyGUI::TextBox *mSpecialization0, *mSpecialization1, *mSpecialization2;
|
2010-09-24 15:28:14 +02:00
|
|
|
|
2012-07-13 03:51:58 -07:00
|
|
|
ESM::Class::Specialization mSpecializationId;
|
2010-09-24 15:28:14 +02:00
|
|
|
};
|
|
|
|
|
2012-08-26 10:52:06 +02:00
|
|
|
class SelectAttributeDialog : public WindowModal
|
2010-09-24 15:28:14 +02:00
|
|
|
{
|
|
|
|
public:
|
2013-04-10 14:46:21 -04:00
|
|
|
SelectAttributeDialog();
|
2012-05-27 06:39:10 +02:00
|
|
|
~SelectAttributeDialog();
|
2010-09-24 15:28:14 +02:00
|
|
|
|
2020-10-16 22:18:54 +04:00
|
|
|
bool exit() override;
|
2014-05-27 14:30:26 -04:00
|
|
|
|
2012-07-13 03:51:58 -07:00
|
|
|
ESM::Attribute::AttributeID getAttributeId() const { return mAttributeId; }
|
2010-09-24 15:28:14 +02:00
|
|
|
|
|
|
|
// Events
|
2012-09-10 09:10:50 +02:00
|
|
|
typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;
|
2010-09-24 15:28:14 +02:00
|
|
|
|
|
|
|
/** Event : Cancel button clicked.\n
|
|
|
|
signature : void method()\n
|
|
|
|
*/
|
|
|
|
EventHandle_Void eventCancel;
|
|
|
|
|
|
|
|
/** Event : Dialog finished, attribute selected.\n
|
|
|
|
signature : void method()\n
|
|
|
|
*/
|
|
|
|
EventHandle_Void eventItemSelected;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void onAttributeClicked(Widgets::MWAttributePtr _sender);
|
|
|
|
void onCancelClicked(MyGUI::Widget* _sender);
|
|
|
|
|
|
|
|
private:
|
2012-07-13 03:51:58 -07:00
|
|
|
ESM::Attribute::AttributeID mAttributeId;
|
2010-09-24 15:28:14 +02:00
|
|
|
};
|
|
|
|
|
2012-08-26 10:52:06 +02:00
|
|
|
class SelectSkillDialog : public WindowModal
|
2010-09-24 15:28:14 +02:00
|
|
|
{
|
|
|
|
public:
|
2013-04-10 14:46:21 -04:00
|
|
|
SelectSkillDialog();
|
2012-05-27 06:39:10 +02:00
|
|
|
~SelectSkillDialog();
|
2010-09-24 15:28:14 +02:00
|
|
|
|
2020-10-16 22:18:54 +04:00
|
|
|
bool exit() override;
|
2014-05-27 14:30:26 -04:00
|
|
|
|
2012-07-13 03:51:58 -07:00
|
|
|
ESM::Skill::SkillEnum getSkillId() const { return mSkillId; }
|
2010-09-24 15:28:14 +02:00
|
|
|
|
|
|
|
// Events
|
2012-09-10 09:10:50 +02:00
|
|
|
typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;
|
2010-09-24 15:28:14 +02:00
|
|
|
|
|
|
|
/** Event : Cancel button clicked.\n
|
|
|
|
signature : void method()\n
|
|
|
|
*/
|
|
|
|
EventHandle_Void eventCancel;
|
|
|
|
|
|
|
|
/** Event : Dialog finished, skill selected.\n
|
|
|
|
signature : void method()\n
|
|
|
|
*/
|
|
|
|
EventHandle_Void eventItemSelected;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void onSkillClicked(Widgets::MWSkillPtr _sender);
|
|
|
|
void onCancelClicked(MyGUI::Widget* _sender);
|
|
|
|
|
|
|
|
private:
|
2012-07-13 03:51:58 -07:00
|
|
|
Widgets::MWSkillPtr mCombatSkill[9];
|
|
|
|
Widgets::MWSkillPtr mMagicSkill[9];
|
|
|
|
Widgets::MWSkillPtr mStealthSkill[9];
|
2010-09-24 15:28:14 +02:00
|
|
|
|
2012-07-13 03:51:58 -07:00
|
|
|
ESM::Skill::SkillEnum mSkillId;
|
2010-09-24 15:28:14 +02:00
|
|
|
};
|
|
|
|
|
2012-08-26 10:52:06 +02:00
|
|
|
class DescriptionDialog : public WindowModal
|
2010-09-27 12:56:48 +02:00
|
|
|
{
|
|
|
|
public:
|
2013-04-10 14:46:21 -04:00
|
|
|
DescriptionDialog();
|
2012-05-27 06:39:10 +02:00
|
|
|
~DescriptionDialog();
|
2010-09-27 12:56:48 +02:00
|
|
|
|
2013-12-27 19:52:10 +01:00
|
|
|
std::string getTextInput() const { return mTextEdit->getCaption(); }
|
|
|
|
void setTextInput(const std::string& text) { mTextEdit->setCaption(text); }
|
2010-09-27 12:56:48 +02:00
|
|
|
|
2014-09-07 03:21:24 +02:00
|
|
|
/** Event : Dialog finished, OK button clicked.\n
|
|
|
|
signature : void method()\n
|
|
|
|
*/
|
|
|
|
EventHandle_WindowBase eventDone;
|
|
|
|
|
2010-09-27 12:56:48 +02:00
|
|
|
protected:
|
|
|
|
void onOkClicked(MyGUI::Widget* _sender);
|
|
|
|
|
|
|
|
private:
|
2013-03-03 13:11:02 +01:00
|
|
|
MyGUI::EditBox* mTextEdit;
|
2010-09-27 12:56:48 +02:00
|
|
|
};
|
|
|
|
|
2013-02-25 06:57:32 +01:00
|
|
|
class CreateClassDialog : public WindowModal
|
2010-09-22 20:59:13 +02:00
|
|
|
{
|
|
|
|
public:
|
2013-04-10 14:46:21 -04:00
|
|
|
CreateClassDialog();
|
2010-09-24 15:28:14 +02:00
|
|
|
virtual ~CreateClassDialog();
|
2010-09-22 20:59:13 +02:00
|
|
|
|
2020-10-16 22:18:54 +04:00
|
|
|
bool exit() override { return false; }
|
2017-09-23 12:18:39 +02:00
|
|
|
|
2010-10-10 02:43:44 +02:00
|
|
|
std::string getName() const;
|
|
|
|
std::string getDescription() const;
|
|
|
|
ESM::Class::Specialization getSpecializationId() const;
|
|
|
|
std::vector<int> getFavoriteAttributes() const;
|
|
|
|
std::vector<ESM::Skill::SkillEnum> getMajorSkills() const;
|
|
|
|
std::vector<ESM::Skill::SkillEnum> getMinorSkills() const;
|
2010-09-22 20:59:13 +02:00
|
|
|
|
|
|
|
void setNextButtonShow(bool shown);
|
|
|
|
|
|
|
|
// Events
|
2012-09-10 09:10:50 +02:00
|
|
|
typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;
|
2010-09-22 20:59:13 +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-22 20:59:13 +02:00
|
|
|
protected:
|
|
|
|
void onOkClicked(MyGUI::Widget* _sender);
|
|
|
|
void onBackClicked(MyGUI::Widget* _sender);
|
|
|
|
|
2013-03-03 13:11:02 +01:00
|
|
|
void onSpecializationClicked(MyGUI::Widget* _sender);
|
2010-09-24 15:28:14 +02:00
|
|
|
void onSpecializationSelected();
|
|
|
|
void onAttributeClicked(Widgets::MWAttributePtr _sender);
|
|
|
|
void onAttributeSelected();
|
|
|
|
void onSkillClicked(Widgets::MWSkillPtr _sender);
|
|
|
|
void onSkillSelected();
|
2010-09-27 12:56:48 +02:00
|
|
|
void onDescriptionClicked(MyGUI::Widget* _sender);
|
2011-02-21 22:33:29 +01:00
|
|
|
void onDescriptionEntered(WindowBase* parWindow);
|
2010-09-24 15:28:14 +02:00
|
|
|
void onDialogCancel();
|
2010-09-22 20:59:13 +02:00
|
|
|
|
2012-05-27 06:39:10 +02:00
|
|
|
void setSpecialization(int id);
|
|
|
|
|
|
|
|
void update();
|
|
|
|
|
2010-09-24 15:28:14 +02:00
|
|
|
private:
|
2013-03-03 13:11:02 +01:00
|
|
|
MyGUI::EditBox* mEditName;
|
2012-07-13 03:51:58 -07:00
|
|
|
MyGUI::TextBox* mSpecializationName;
|
|
|
|
Widgets::MWAttributePtr mFavoriteAttribute0, mFavoriteAttribute1;
|
|
|
|
Widgets::MWSkillPtr mMajorSkill[5];
|
|
|
|
Widgets::MWSkillPtr mMinorSkill[5];
|
|
|
|
std::vector<Widgets::MWSkillPtr> mSkills;
|
|
|
|
std::string mDescription;
|
|
|
|
|
2022-07-20 22:13:33 +02:00
|
|
|
std::unique_ptr<SelectSpecializationDialog> mSpecDialog;
|
|
|
|
std::unique_ptr<SelectAttributeDialog> mAttribDialog;
|
|
|
|
std::unique_ptr<SelectSkillDialog> mSkillDialog;
|
|
|
|
std::unique_ptr<DescriptionDialog> mDescDialog;
|
2012-07-13 03:51:58 -07:00
|
|
|
|
|
|
|
ESM::Class::Specialization mSpecializationId;
|
2012-09-24 22:09:38 +02:00
|
|
|
|
|
|
|
Widgets::MWAttributePtr mAffectedAttribute;
|
|
|
|
Widgets::MWSkillPtr mAffectedSkill;
|
2010-09-22 20:59:13 +02:00
|
|
|
};
|
2010-09-19 04:29:22 +02:00
|
|
|
}
|
|
|
|
#endif
|