Example #1
0
 public MenuState()
 {
     gui = new GuiManager(Game.Instance.Content.Load<SpriteFont>("default"));
     LinkLabel start = new LinkLabel();
     start.Text = "Start game";
     start.Position = new Vector2(Game.Instance.ScreenWidth / 2, 300);
     start.HasFocus = true;
     start.Color = Color.Red;
     start.SelectedColor = Color.White;
     start.OnSelected += start_OnSelected;
     gui.AddControl(start);
 }
Example #2
0
        public HowManyPlayersState()
        {
            gui  = new GuiManager(Game.Instance.Content.Load<SpriteFont>("default"));
            LinkLabel one = new LinkLabel();
            one.Position = new Vector2(Game.Instance.ScreenWidth / 2, 300);
            one.Color = Color.Red;
            one.SelectedColor = Color.White;
            one.Text = "One player";
            one.HasFocus = true;

            one.OnSelected += one_OnSelected;

            LinkLabel two = new LinkLabel();
            two.Position = new Vector2(one.Position.X, one.Position.Y + 100);
            two.Color = Color.Red;
            two.SelectedColor = Color.White;
            two.Text = "Two players - Gamepad";
            two.OnSelected += two_OnSelected;

            gui.AddControl(one);
            gui.AddControl(two);
        }