From a41060c06e0e634f0a24d038c749c35a7ca709a7 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Tue, 21 Dec 2004 14:03:07 +0000 Subject: Committing ported character select and new character dialogs by nym. --- src/gui/char_select.h | 84 +++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 74 insertions(+), 10 deletions(-) (limited to 'src/gui/char_select.h') 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 + +/** + * 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 -- cgit v1.2.3-70-g09d2