Exemple #1
0
 private TextBox TxtPassword()
 {
     var txtPassword = new TextBox(game)
                           {
                               Element = new Rectangle(20, 50, 200, 20),
                               IsSelected = false,
                               Watermark = "password (8-16 chars)",
                               MaxCharacters = 16,
                               ActiveColor = Color.DarkGreen,
                               DeactiveColor = Color.DarkBlue,
                               Pulse = new Pulse<string>(500),
                               PasswordLetter = "*"
                           };
     txtPassword.Pulse.Add("_");
     txtPassword.Pulse.Add("");
     return txtPassword;
 }
Exemple #2
0
 private TextBox TxtUsername()
 {
     var txtUsername = new TextBox(game)
                           {
                               Element = new Rectangle(20, 20, 200, 20),
                               IsSelected = false,
                               Watermark = "username (a-z,0-9)",
                               MaxCharacters = 16,
                               ActiveColor = Color.DarkGreen,
                               DeactiveColor = Color.DarkBlue,
                               Pulse = new Pulse<string>(500)
                           };
     txtUsername.Pulse.Add("_");
     txtUsername.Pulse.Add("");
     return txtUsername;
 }
Exemple #3
0
 public override void Initialize()
 {
     _txtUsername = TxtUsername();
     _txtUsername.Initialize();
     Components.Add(_txtUsername);
     _txtPassword = TxtPassword();
     _txtPassword.Initialize();
     Components.Add(_txtPassword);
     _loginButton = BtnLogin();
     _loginButton.Initialize();
     _loginButton.OnClick += ClickLogin;
     Components.Add(_loginButton);
     base.Initialize();
 }