public InGame() { Base endTurn = new Base(this); endTurn.Width = 96; endTurn.Height =64; endTurn.BackgroundColor = System.Drawing.Color.BlanchedAlmond; endTurn.ShowBackgroundColor =false; endTurn.Text = "End Turn"; //this.LoadTexture("button.png"); endTurn.OnMouseUp += delegate(OpenTK.Input.MouseButtonEventArgs args) { Game.Game.Instance.EndTurn(); }; unitInfo = new SelectedUnitInfo(this); Base menuButton = new Base(this); menuButton.Width = 64; menuButton.Height = 64; menuButton.BackgroundColor = System.Drawing.Color.Black; menuButton.ShowBackgroundColor =false; menuButton.Y =129; menuButton.Text = "Menu"; menuButton.OnMouseUp+= delegate(OpenTK.Input.MouseButtonEventArgs args) { Game.Game.State.ChangeState(State.States.MENU); Console.WriteLine("Menuclicked"); }; this.children.Add(endTurn); this.children.Add(unitInfo); this.children.Add(menuButton); }
public SelectedUnitInfo(InterfaceElement parent) { this.parent = parent; this.Width=140; this.Height =80; this.X = 500; this.Y = 400; Name = new Base(this); Name.X = 500; Name.Y = 400; Name.Width=140; Name.Height =32; Name.Text ="NAME"; Hp = new Base(this); Hp.X = 500; Hp.Y = 433; Hp.Width=140; Hp.Height =32; Hp.Text = "Health:"; Actions = new Base(this); Actions.X = 500; Actions.Y = 464; Actions.Width=140; Actions.Height =32; Actions.Text = "Actions:"; this.children.Add(Name); this.children.Add(Hp); this.children.Add(Actions); }
public MainMenu() { Base newGame, lobby,dimmer; newGame = new Base(this); newGame.Width = 128; newGame.Height = 32; newGame.Text = "new game"; lobby = new Base (this); lobby.Width = 128; lobby.Height = 32; lobby.Y = 32; lobby.Text = "Lobby"; dimmer = new Base (this); dimmer.Width = Renderer.Render.Instance.Width; dimmer.Height = Renderer.Render.Instance.Height; dimmer.BackgroundColor = System.Drawing.Color.FromArgb (128, 0, 0, 0); dimmer.ShowBackgroundColor = true; newGame.OnMouseUp += delegate(OpenTK.Input.MouseButtonEventArgs args) { //TODO CREATE NEW GAME Game.Game.State.ChangeState(BeatDown.Game.State.States.INGAME); }; this.children.Add(newGame); this.children.Add (lobby); this.children.Add (dimmer); }