/// <summary> /// Initializes the scene /// </summary> protected override void OnInitialize() { this.background = AlmiranteEngine.Resources.CreateTexture(1, 1, Color.Black); this.button1 = new Button() { Position = new Vector2(540, 240), Size = new Vector2(200, 50), Text = "Graphics" }; this.button1.MouseClick += new EventHandler<MouseEventArgs>((obj, args) => { }); this.Interface.Controls.Add(this.button1); this.button2 = new Button() { Position = new Vector2(540, 240 + 60), Size = new Vector2(200, 50), Text = "Audio" }; this.button2.MouseClick += new EventHandler<MouseEventArgs>((obj, args) => { }); this.Interface.Controls.Add(this.button2); this.button3 = new Button() { Position = new Vector2(540, 240 + 60 + 60), Size = new Vector2(200, 50), Text = "Controls" }; this.button3.MouseClick += new EventHandler<MouseEventArgs>((obj, args) => { }); this.Interface.Controls.Add(this.button3); this.button4 = new Button() { Position = new Vector2(540, 240 + 60 + 60 + 60), Size = new Vector2(200, 50), Text = "Back" }; this.button4.MouseClick += new EventHandler<MouseEventArgs>((obj, args) => { AlmiranteEngine.Scenes.Pop(FadeOutTransition.Name, 1.0f); }); this.Interface.Controls.Add(this.button4); }
/// <summary> /// Initializes the scene /// </summary> protected override void OnInitialize() { this.button1 = new Button() { Position = new Vector2(540, 270), Size = new Vector2(200, 50), Text = "Play" }; this.button1.MouseClick += new EventHandler<MouseEventArgs>((obj, args) => { }); this.Interface.Controls.Add(this.button1); this.button2 = new Button() { Position = new Vector2(540, 270 + 60), Size = new Vector2(200, 50), Text = "Options" }; this.button2.MouseClick += new EventHandler<MouseEventArgs>((obj, args) => { AlmiranteEngine.Scenes.Push<OptionsScene>(FadeInTransition.Name, 1.0f); }); this.Interface.Controls.Add(this.button2); this.button3 = new Button() { Position = new Vector2(540, 270 + 60 + 60), Size = new Vector2(200, 50), Text = "Exit" }; this.button3.MouseClick += new EventHandler<MouseEventArgs>((obj, args) => { AlmiranteEngine.Stop(); }); this.Interface.Controls.Add(this.button3); }