summaryrefslogtreecommitdiff
path: root/src/gui/register.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/register.h')
-rw-r--r--src/gui/register.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/gui/register.h b/src/gui/register.h
index 3dddae0f..4b95a07b 100644
--- a/src/gui/register.h
+++ b/src/gui/register.h
@@ -23,10 +23,12 @@
#define REGISTER_H
#include <iosfwd>
+
#include <guichan/actionlistener.hpp>
#include <guichan/keylistener.hpp>
#include "window.h"
+
#include "../guichanfwd.h"
class LoginData;
@@ -72,10 +74,29 @@ class RegisterDialog : public Window, public gcn::ActionListener,
*/
bool canSubmit() const;
+ /**
+ * 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);
+
gcn::TextField *mUserField;
gcn::TextField *mPasswordField;
gcn::TextField *mConfirmField;
gcn::TextField *mServerField;
+ gcn::TextField *mPortField;
gcn::Button *mRegisterButton;
gcn::Button *mCancelButton;