private void CreateControls() { // Login Input _loginBox = new InputControl { IsHidden = false, Bounds = new UniRectangle(new UniScalar(0.5f, -100f), new UniScalar(0.4f, -30), 200, 30), Text = Settings.Default.login }; // Password Input _passwordBox = new InputControl { IsHidden = true, Bounds = new UniRectangle(new UniScalar(0.5f, -100f), new UniScalar(0.4f, 30), 200, 30), RealText = Settings.Default.password, Text = InputControl.HiddenText(Settings.Default.password) }; // Login Label _loginLabel = new LabelControl("Username") { Bounds = new UniRectangle(new UniScalar(0.5f, -32), new UniScalar(0.4f, -70), 100, 30) }; // Password Label _passwordLabel = new LabelControl("Password") { Bounds = new UniRectangle(new UniScalar(0.5f, -32), new UniScalar(0.4f, 0), 100, 30) }; // Login Button _loginButton = new ButtonControl { Text = "Login", Bounds = new UniRectangle(new UniScalar(0.5f, 110), new UniScalar(0.4f, 70), 100, 32) }; // Back Button _exitButton = new ButtonControl { Text = "Exit", Bounds = new UniRectangle(new UniScalar(0.5f, -210f), new UniScalar(0.4f, 70), 100, 32), }; // New Account Button _newAccountButton = new ButtonControl { Text = "Create new account", Bounds = new UniRectangle(new UniScalar(0.5f, -75f), new UniScalar(0.4f, 70), 150, 32) }; }
private void CreateControls() { // Login Input _loginBox = new InputControl { IsHidden = false, Bounds = new UniRectangle(new UniScalar(0.5f, -100f), new UniScalar(0.4f, -30), 200, 30), Text = string.Empty }; // Password Input _passwordBox = new InputControl { IsHidden = true, Bounds = new UniRectangle(new UniScalar(0.5f, -100f), new UniScalar(0.4f, 30), 200, 30), RealText = string.Empty, Text = string.Empty }; // Login Label _loginLabel = new LabelControl("Username") { Bounds = new UniRectangle(new UniScalar(0.5f, -32), new UniScalar(0.4f, -70), 100, 30) }; // Password Label _passwordLabel = new LabelControl("Password") { Bounds = new UniRectangle(new UniScalar(0.5f, -32), new UniScalar(0.4f, 0), 100, 30) }; // Back Button _backButton = new ButtonControl { Text = "Back", Bounds = new UniRectangle(new UniScalar(0.5f, -210f), new UniScalar(0.4f, 70), 100, 32) }; // Login Button _okButton = new ButtonControl { Text = "Create", Bounds = new UniRectangle(new UniScalar(0.5f, 110), new UniScalar(0.4f, 70), 100, 32) }; }