diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2004-12-21 14:03:07 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2004-12-21 14:03:07 +0000 |
commit | a41060c06e0e634f0a24d038c749c35a7ca709a7 (patch) | |
tree | 544830b4ea9db456df1581170ebd0e81a1c6d124 /src/gui/char_select.h | |
parent | e7f1e289484e4c2579c70e3441a2985f7e6cd98b (diff) | |
download | mana-a41060c06e0e634f0a24d038c749c35a7ca709a7.tar.gz mana-a41060c06e0e634f0a24d038c749c35a7ca709a7.tar.bz2 mana-a41060c06e0e634f0a24d038c749c35a7ca709a7.tar.xz mana-a41060c06e0e634f0a24d038c749c35a7ca709a7.zip |
Committing ported character select and new character dialogs by nym.
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 |