diff options
Diffstat (limited to 'src/gui/char_select.h')
-rw-r--r-- | src/gui/char_select.h | 84 |
1 files changed, 74 insertions, 10 deletions
diff --git a/src/gui/char_select.h b/src/gui/char_select.h index f29d938f..b0f8a135 100644 --- a/src/gui/char_select.h +++ b/src/gui/char_select.h @@ -19,10 +19,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifdef WIN32 - #pragma warning (disable:4312) -#endif - #ifndef _CHAR_SELECT_H #define _CHAR_SELECT_H @@ -31,12 +27,80 @@ #include "../main.h" #include "../net/network.h" #include "gui.h" +#include "button.h" +#include <guichan/allegro.hpp> + +/** + * Character selection dialog. + * + * \ingroup GUI + */ +class CharSelectDialog : public Window, public gcn::ActionListener { + private: + Button *selectButton; + Button *cancelButton; + Button *newCharButton; + Button *delCharButton; + + gcn::Label *nameLabel; + gcn::Label *levelLabel; + gcn::Label *jobLevelLabel; + gcn::Label *moneyLabel; + + public: + CharSelectDialog(gcn::Container *parent); + ~CharSelectDialog(); + + void action(const std::string& eventId); + void setName(const std::string name) + { + nameLabel->setCaption(name); + } + void setLevel(const std::string level) + { + levelLabel->setCaption(level); + } + void setJobLevel(const std::string level) + { + jobLevelLabel->setCaption(level); + } + void setMoney(const std::string money) + { + moneyLabel->setCaption(money); + } +}; + +/** + * Character creation dialog. + * + * \ingroup GUI + */ +class CharCreateDialog : public Window, public gcn::ActionListener { + private: + gcn::TextField *nameField; + gcn::Label *nameLabel; + Button *nextHairColorButton; + Button *prevHairColorButton; + gcn::Label *hairColorLabel; + Button *nextHairStyleButton; + Button *prevHairStyleButton; + gcn::Label *hairStyleLabel; + + Button *createButton; + + public: + CharCreateDialog(gcn::Container *parent); + ~CharCreateDialog(); + + void action(const std::string& eventId); + std::string getName() { return nameField->getText(); } +}; + +void charSelect(); +void serverCharSelect(); -int tmw_incbutt_proc(int msg, DIALOG *d, int c); -int tmw_incbutt_proc2(int msg, DIALOG *d, int c); -int tmw_player_proc(int msg, DIALOG *d, int c); -void char_select(); -void server_char_select(); -void server_char_delete(); +void charCreate(); +void serverCharDelete(); +void serverCharCreate(); #endif |