/// <summary> /// Allows the game component to perform any initialization it needs to before starting /// to run. This is where it can query for any required services and load content. /// </summary> public override void Initialize() { panel = new Panel(this.Game, new Vector2(Game.Window.ClientBounds.Width / 2 - 200 / 2, Game.Window.ClientBounds.Height / 2 - 150 / 2), 220, 150); Game.Components.Add(panel); base.Initialize(); }
/// <summary> /// Allows the game component to perform any initialization it needs to before starting /// to run. This is where it can query for any required services and load content. /// </summary> public override void Initialize() { panel = new Panel(this.Game, new Vector2(Game.Window.ClientBounds.Width - 255, Game.Window.ClientBounds.Height - 285), 250, 280); Game.Components.Add(panel); spPanel = new Panel(this.Game, new Vector2(10, 10), 140, 40); Game.Components.Add(spPanel); springPanel = new Panel(this.Game, new Vector2(10, Game.Window.ClientBounds.Height - (((Lab)Game).basicLab.springs.Count * 20 + 35)), 100, ((Lab)Game).basicLab.springs.Count * 20 + 20); springPanel.Height += 15; Game.Components.Add(springPanel); base.Initialize(); }