Exemplo n.º 1
0
 Component CreateBackButton(Microsoft.Xna.Framework.Game game)
 {
     var btnBack = new Button(game, "Return") { HorizontalOrigin = HorizontalAlign.Center };
     btnBack.Position = new Point(
         Game.GraphicsDevice.Viewport.Width / 2,
         Game.GraphicsDevice.Viewport.Height * 7 / 8);
     btnBack.Clicked += (s, e) => Exit();
     return btnBack;
 }
Exemplo n.º 2
0
 void CreateBackButton(Game game)
 {
     var btnBack = new Button(game, "Return") { HorizontalOrigin = HorizontalAlign.Center };
     btnBack.Position = new Point(
         Viewport.Width / 2,
         Viewport.Height * 7 / 8);
     btnBack.Clicked += (s, e) => Exit();
     _gui.Add(btnBack);
 }
Exemplo n.º 3
0
        void CreateButtons(Game game)
        {
            var btnBack = new Button(game, "Return") { HorizontalOrigin = HorizontalAlign.Center };
            btnBack.Position = new Point(
                Viewport.Width * 3 / 4,
                Viewport.Height * 7 / 8);
            btnBack.Clicked += (s, e) => Exit();
            _gui.Add(btnBack);

            _modeButton = new Button(game, "Total") { HorizontalOrigin = HorizontalAlign.Center, IsVisible = false };
            _modeButton.Position = new Point(
                Viewport.Width / 4,
                Viewport.Height * 7 / 8);
            _modeButton.Clicked += (s, e) =>
            {
                LoadRankType(_orderByHighscore);
            };
            _gui.Add(_modeButton);
        }