Example #1
0
 public StartScene(Game game, SpriteFont smallFont, SpriteFont largeFont,
                   Texture2D background)
     : base(game)
 {
     Components.Add(new ImageComponent(game, background,
                                       ImageComponent.DrawMode.Stretch));
     menu = new TextMenuComponent(game, smallFont, largeFont);
     menu.SetMenuItems(items);
     Components.Add(menu);
     spriteBatch = (SpriteBatch)Game.Services.GetService(
         typeof(SpriteBatch));
 }
Example #2
0
 public StartScene(Game game, SpriteFont smallFont, SpriteFont largeFont,
     Texture2D background)
     : base(game)
 {
     Components.Add(new ImageComponent(game, background,
                                     ImageComponent.DrawMode.Stretch));
     menu = new TextMenuComponent(game, smallFont, largeFont);
     menu.SetMenuItems(items);
     Components.Add(menu);
     spriteBatch = (SpriteBatch)Game.Services.GetService(
                         typeof(SpriteBatch));
 }
Example #3
0
        public ConsoleScene(Game game, SpriteFont smallFont, SpriteFont largeFont,
            Texture2D background)
            : base(game)
        {
            this.largeFont = largeFont;
            this.smallFont = smallFont;
            uptext = new String[] { "Update servers", "Back" };
            servers = new TextMenuComponent(game, smallFont, largeFont);
            UpdateServerList();
            Components.Add(new ImageComponent(game, background,
                                            ImageComponent.DrawMode.Center));

            Components.Add(servers);

            spriteBatch = (SpriteBatch)Game.Services.GetService(
                                typeof(SpriteBatch));
        }
Example #4
0
        public ConsoleScene(Game game, SpriteFont smallFont, SpriteFont largeFont,
                            Texture2D background)
            : base(game)
        {
            this.largeFont = largeFont;
            this.smallFont = smallFont;
            uptext         = new String[] { "Update servers", "Back" };
            servers        = new TextMenuComponent(game, smallFont, largeFont);
            UpdateServerList();
            Components.Add(new ImageComponent(game, background,
                                              ImageComponent.DrawMode.Center));

            Components.Add(servers);

            spriteBatch = (SpriteBatch)Game.Services.GetService(
                typeof(SpriteBatch));
        }