Exemplo n.º 1
0
 public IMenu CreateMainMenu(MenuPainter painter)
 {
     return new MainMenu(
         _graphicsManager.GetTexture("background"),
         painter,
         this
         );
 }
Exemplo n.º 2
0
 public IMenu CreateGameMenu(MenuPainter painter)
 {
     return new GameMenu(
         painter.CreatePixel(Color.Black),
         painter,
         this
         );
 }
Exemplo n.º 3
0
        public MainMenu(Texture2D background, MenuPainter painter, MenuFactory factory)
            : base(background, painter, factory)
        {
            var startButton = Factory.CreateMenuButton("NewSimulation");
            var exitButton = Factory.CreateMenuButton("Exit");

            startButton.Click += StartButtonOnClick;
            exitButton.Click += ExitButtonOnClick;
            Elements.Add(startButton);
            Elements.Add(exitButton);
            Resize();
        }
Exemplo n.º 4
0
 public void LoadContent(MenuPainter painter, MenuFactory factory)
 {
     _menus.Add(factory.CreateMainMenu(painter));
     _menus.Add(factory.CreateGameMenu(painter));
 }
Exemplo n.º 5
0
 protected SimpleMenu(Texture2D background, MenuPainter painter, MenuFactory factory)
 {
     Factory = factory;
     Painter = painter;
     SetBackground(background);
 }