summaryrefslogtreecommitdiff
path: root/src/gui/char_select.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-22 19:45:03 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-22 19:45:56 +0100
commit0c43d04b438d41c277ae80402d4b4888db1a0b64 (patch)
tree3aaeb75ecd1bcbe85decedab5f1fa426fe0411e3 /src/gui/char_select.h
parenta7f5eaeb7f643658d356533a608f0f18d85b6d32 (diff)
parent401802c1d7a1b3d659bdc53a45d9a6292fc1121e (diff)
downloadmana-0c43d04b438d41c277ae80402d4b4888db1a0b64.tar.gz
mana-0c43d04b438d41c277ae80402d4b4888db1a0b64.tar.bz2
mana-0c43d04b438d41c277ae80402d4b4888db1a0b64.tar.xz
mana-0c43d04b438d41c277ae80402d4b4888db1a0b64.zip
Merged the tmwserv client with the eAthena client
This merge involved major changes on both sides, and as such took several weeks. Lots of things are expected to be broken now, however, we now have a single code base to improve and extend, which can be compiled to support either eAthena or tmwserv. In the coming months, the plan is to work towards a client that supports both eAthena and tmwserv, without needing to be recompiled. Conflicts: Everywhere!
Diffstat (limited to 'src/gui/char_select.h')
-rw-r--r--src/gui/char_select.h64
1 files changed, 58 insertions, 6 deletions
diff --git a/src/gui/char_select.h b/src/gui/char_select.h
index 28091a18..0ff1d18f 100644
--- a/src/gui/char_select.h
+++ b/src/gui/char_select.h
@@ -27,10 +27,16 @@
#include "window.h"
#include "../being.h"
+#include "../guichanfwd.h"
#include "../lockedarray.h"
-class LocalPlayer;
+#ifdef TMWSERV_SUPPORT
+#include "../logindata.h"
+#else
class Network;
+#endif
+
+class LocalPlayer;
class Player;
class PlayerBox;
@@ -46,9 +52,14 @@ class CharSelectDialog : public Window, public gcn::ActionListener
/**
* Constructor.
*/
+#ifdef TMWSERV_SUPPORT
+ CharSelectDialog(LockedArray<LocalPlayer*> *charInfo,
+ LoginData *loginData);
+#else
CharSelectDialog(Network *network,
LockedArray<LocalPlayer*> *charInfo,
Gender gender);
+#endif
void action(const gcn::ActionEvent &event);
@@ -59,25 +70,40 @@ class CharSelectDialog : public Window, public gcn::ActionListener
bool selectByName(const std::string &name);
private:
+#ifdef EATHENA_SUPPORT
Network *mNetwork;
+#endif
LockedArray<LocalPlayer*> *mCharInfo;
gcn::Button *mSelectButton;
gcn::Button *mCancelButton;
- gcn::Button *mNewDelCharButton;
gcn::Button *mPreviousButton;
gcn::Button *mNextButton;
gcn::Label *mNameLabel;
gcn::Label *mLevelLabel;
- gcn::Label *mJobLevelLabel;
- gcn::Label *mMoneyLabel; std::string mMoney;
+ gcn::Label *mMoneyLabel;
+ std::string mMoney;
PlayerBox *mPlayerBox;
- Gender mGender;
bool mCharSelected;
+#ifdef TMWSERV_SUPPORT
+ gcn::Button *mNewCharButton;
+ gcn::Button *mDelCharButton;
+ gcn::Button *mUnRegisterButton;
+ gcn::Button *mChangePasswordButton;
+ gcn::Button *mChangeEmailButton;
+ gcn::Label *mAccountNameLabel;
+
+ LoginData *mLoginData;
+#else
+ gcn::Button *mNewDelCharButton;
+ gcn::Label *mJobLevelLabel;
+ Gender mGender;
+#endif
+
/**
* Communicate character deletion to the server.
*/
@@ -92,7 +118,7 @@ class CharSelectDialog : public Window, public gcn::ActionListener
/**
* Character creation dialog.
*
- * \ingroup GUI
+ * \ingroup Interface
*/
class CharCreateDialog : public Window, public gcn::ActionListener
{
@@ -100,8 +126,12 @@ class CharCreateDialog : public Window, public gcn::ActionListener
/**
* Constructor.
*/
+#ifdef TMWSERV_SUPPORT
+ CharCreateDialog(Window *parent, int slot);
+#else
CharCreateDialog(Window *parent, int slot, Network *network,
Gender gender);
+#endif
/**
* Destructor.
@@ -116,6 +146,12 @@ class CharCreateDialog : public Window, public gcn::ActionListener
void unlock();
private:
+#ifdef TMWSERV_SUPPORT
+ int getDistributedPoints();
+
+ void UpdateSliders();
+#endif
+
/**
* Returns the name of the character to create.
*/
@@ -126,7 +162,9 @@ class CharCreateDialog : public Window, public gcn::ActionListener
*/
void attemptCharCreate();
+#ifdef EATHENA_SUPPORT
Network *mNetwork;
+#endif
gcn::TextField *mNameField;
gcn::Label *mNameLabel;
gcn::Button *mNextHairColorButton;
@@ -135,6 +173,20 @@ class CharCreateDialog : public Window, public gcn::ActionListener
gcn::Button *mNextHairStyleButton;
gcn::Button *mPrevHairStyleButton;
gcn::Label *mHairStyleLabel;
+
+#ifdef TMWSERV_SUPPORT
+ gcn::RadioButton *mMale;
+ gcn::RadioButton *mFemale;
+
+ gcn::Slider *mAttributeSlider[6];
+ gcn::Label *mAttributeLabel[6];
+ gcn::Label *mAttributeValue[6];
+ gcn::Label *mAttributesLeft;
+
+ static const int mMaxPoints = 60;
+ int mUsedPoints;
+#endif
+
gcn::Button *mCreateButton;
gcn::Button *mCancelButton;