summaryrefslogtreecommitdiff
path: root/src/gui/register.h
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-09-30 19:54:06 -0600
committerJared Adams <jaxad0127@gmail.com>2009-09-30 19:54:06 -0600
commitd4f32a38fd498c180d562ced38a9129e0abf2252 (patch)
treee655b59ff686ad5fe2bdd11d6e072f5c3a4493b7 /src/gui/register.h
parent6707d108790ab1fe1d4a3ef52d717966990fdf0a (diff)
downloadmana-client-d4f32a38fd498c180d562ced38a9129e0abf2252.tar.gz
mana-client-d4f32a38fd498c180d562ced38a9129e0abf2252.tar.bz2
mana-client-d4f32a38fd498c180d562ced38a9129e0abf2252.tar.xz
mana-client-d4f32a38fd498c180d562ced38a9129e0abf2252.zip
Merge login state machines for both clients
Also do some cleanup and refactoring of related code.
Diffstat (limited to 'src/gui/register.h')
-rw-r--r--src/gui/register.h38
1 files changed, 12 insertions, 26 deletions
diff --git a/src/gui/register.h b/src/gui/register.h
index 6839c805..729b21c3 100644
--- a/src/gui/register.h
+++ b/src/gui/register.h
@@ -24,6 +24,8 @@
#include "gui/widgets/window.h"
+#include "player.h"
+
#include <guichan/actionlistener.hpp>
#include <guichan/keylistener.hpp>
@@ -78,6 +80,13 @@ class RegisterDialog : public Window, public gcn::ActionListener,
*/
void keyPressed(gcn::KeyEvent &keyEvent);
+ /**
+ * Tell the dialog to show a gender selection. Value stored in the
+ * passed Gender pointer. Default Gender from pointer. Passing NULL
+ * disables the feature.
+ */
+ static void setGender(Gender *gender);
+
private:
/**
* Returns whether submit can be enabled. This is true in the register
@@ -85,46 +94,23 @@ class RegisterDialog : public Window, public gcn::ActionListener,
*/
bool canSubmit() const;
-#ifdef EATHENA_SUPPORT
- /**
- * Function to decide whether string is an unsigned short or not
- *
- * @param str the string to parse
- *
- * @return true if str is an unsigned short, false otherwise
- */
- static bool isUShort(const std::string &str);
-
- /**
- * Converts string to an unsigned short (undefined if invalid)
- *
- * @param str the string to parse
- *
- * @return the value str represents
- */
- static unsigned short getUShort(const std::string &str);
-#endif
-
gcn::TextField *mUserField;
gcn::TextField *mPasswordField;
gcn::TextField *mConfirmField;
-#ifdef EATHENA_SUPPORT
- gcn::TextField *mServerField;
- gcn::TextField *mPortField;
-#else
+#ifdef TMWSERV_SUPPORT
gcn::TextField *mEmailField;
#endif
gcn::Button *mRegisterButton;
gcn::Button *mCancelButton;
-#ifdef EATHENA_SUPPORT
gcn::RadioButton *mMaleButton;
gcn::RadioButton *mFemaleButton;
-#endif
WrongDataNoticeListener *mWrongDataNoticeListener;
LoginData *mLoginData;
+
+ static Gender *useGender;
};
#endif