Placeholder text for username and password in login, Focus username at start

This commit is contained in:
Simon Robertshaw 2012-07-25 11:59:20 +01:00
parent e291144ea7
commit 2abb2b2c9f

View File

@ -35,12 +35,13 @@ LoginView::LoginView():
loginButton(new ui::Button(ui::Point(200-100, 87-17), ui::Point(100, 17), "Sign in")),
cancelButton(new ui::Button(ui::Point(0, 87-17), ui::Point(101, 17), "Cancel")),
titleLabel(new ui::Label(ui::Point(4, 5), ui::Point(200-16, 16), "Server login")),
usernameField(new ui::Textbox(ui::Point(8, 25), ui::Point(200-16, 17), Client::Ref().GetAuthUser().Username)),
passwordField(new ui::Textbox(ui::Point(8, 46), ui::Point(200-16, 17), "")),
usernameField(new ui::Textbox(ui::Point(8, 25), ui::Point(200-16, 17), Client::Ref().GetAuthUser().Username, "[username]")),
passwordField(new ui::Textbox(ui::Point(8, 46), ui::Point(200-16, 17), "", "[password]")),
infoLabel(new ui::Label(ui::Point(8, 67), ui::Point(200-16, 16), "")),
targetSize(0, 0)
{
targetSize = Size;
FocusComponent(usernameField);
infoLabel->Appearance.HorizontalAlign = ui::Appearance::AlignCentre; infoLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
infoLabel->Visible = false;