Ejemplo n.º 1
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();
        }
Ejemplo n.º 2
0
 public void LoadContent(MenuPainter painter, MenuFactory factory)
 {
     _menus.Add(factory.CreateMainMenu(painter));
     _menus.Add(factory.CreateGameMenu(painter));
 }
Ejemplo n.º 3
0
 protected SimpleMenu(Texture2D background, MenuPainter painter, MenuFactory factory)
 {
     Factory = factory;
     Painter = painter;
     SetBackground(background);
 }