public override void Load() { labelBox = new LabelBox(10); labelBox.Initialize(); labelBox.Location = Vector2.Zero; labelBox.Text = "PLAYER1"; this.AddControl(labelBox); this.KeyUp += new KeyEventHandler(UserProfileFrame_KeyUp); base.Load(); }
public override void Load() { CommandBox = new LabelBox(25); CommandBox.Initialize(); CommandBox.Text = String.Empty; this.AddControl(CommandBox); this.KeyUp += new KeyEventHandler(EditorConsole_KeyUp); this.Selected += new ControlEventHandler(EditorConsole_Selected); this.Deselected += new ControlEventHandler(EditorConsole_Deselected); base.Load(); }
public OptionsMenuFrame() : base("Options") { TriviaQuestions = new Label(Vector2.UnitY * spacingConstant, "Add Trivia Questions: "); WindowSizeX = new Label(Vector2.UnitY * 2 * spacingConstant, "Window Size - X: "); WindowSizeY = new Label(Vector2.UnitY * 3 * spacingConstant, "Window Size - Y: "); PixelsPerMeter = new Label(Vector2.UnitY * 4 * spacingConstant, "Pixels Per Meter: "); trueFalseButton = new TrueFalseButton(false, Vector2.Zero); WindowSizeXBox = new LabelBox(3); WindowSizeYBox = new LabelBox(3); PixelsPerMeterBox = new LabelBox(2); EnterButton = new ImageButton(Vector2.Zero); userMessageFrame = new PopUpMenuFrame("Please Restart Game After Closing This Window \n Or Else, Your Changed Settings Will Not Occur"); }
public override void Load() { for (int i = 0; i < _inputs.Length; i++) { LabelBox labelBox = new LabelBox(20); labelBox.Initialize(); labelBox.Text = ""; labelBox.Location += Vector2.UnitY * ((controlSpacing + labelBox.ElementSize.Height ) * (2 * i + 1)); Label label = new Label( new Vector2(0, (controlSpacing + labelBox.ElementSize.Height) * 2 * i), _inputs[i]+":"); label.Initialize(); this.AddControl(label); this.AddControl(labelBox); InputFields.Add(_inputs[i], labelBox); } this.KeyUp += new KeyEventHandler(UserProfileFrame_KeyUp); base.Load(); }