public IMenu CreateMainMenu(MenuPainter painter) { return new MainMenu( _graphicsManager.GetTexture("background"), painter, this ); }
public IMenu CreateGameMenu(MenuPainter painter) { return new GameMenu( painter.CreatePixel(Color.Black), painter, this ); }
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(); }
public void LoadContent(MenuPainter painter, MenuFactory factory) { _menus.Add(factory.CreateMainMenu(painter)); _menus.Add(factory.CreateGameMenu(painter)); }
protected SimpleMenu(Texture2D background, MenuPainter painter, MenuFactory factory) { Factory = factory; Painter = painter; SetBackground(background); }