46 gcn::Label *userLabel =
new Label(
_(
"Name:"));
47 gcn::Label *passLabel =
new Label(
_(
"Password:"));
65 place(0, 0, userLabel);
66 place(0, 1, passLabel);
92 if (event.getId() ==
"login" &&
canSubmit())
105 else if (event.getId() ==
"server")
109 else if (event.getId() ==
"register")
119 new OkDialog(
_(
"Registration disabled"),
_(
"You need to use the "
120 "website to register an account for this server."));
127 gcn::Key key = keyEvent.getKey();
static void setState(State state)
LayoutCell & setPadding(int p)
Sets the padding around the cell content.
LayoutCell & setHAlign(Alignment a)
Sets the horizontal alignment of the cell content.
bool remember
Whether to store the username.
bool registerLogin
Whether an account is being registered.
gcn::Button * mLoginButton
gcn::TextField * mPassField
bool canSubmit() const
Returns whether submit can be enabled.
void action(const gcn::ActionEvent &event) override
Called when receiving actions from the widgets.
void keyPressed(gcn::KeyEvent &keyEvent) override
Called when a key is pressed in one of the text fields.
LoginDialog(LoginData *loginData)
gcn::Button * mRegisterButton
gcn::CheckBox * mKeepCheck
gcn::TextField * mUserField
gcn::Button * mServerButton
void center()
Positions the window in the center of it's parent.
virtual void setVisible(bool visible)
Overloads window setVisible by Guichan to allow sticky window handling.
void reflowLayout(int w=0, int h=0)
Computes the position of the widgets according to the current layout.
LayoutCell & place(int x, int y, gcn::Widget *, int w=1, int h=1)
Adds a widget to the window and sets it at given cell.
LoginHandler * getLoginHandler()