Example #1
0
        public GameOverMenu(Renderer renderer, AppWindow app)
        {
            appWindow = app;
            playAgainButton = new Button(renderer.CreateTextureFromFile("start.png"), new OpenTK.Box2(-1, 2, 1, 1));
            mainMenuButton = new Button(renderer.CreateTextureFromFile("mainMenu.png"), new OpenTK.Box2(-1, 1, 1, -1));
            quitButton = new Button(renderer.CreateTextureFromFile("quit.png"), new OpenTK.Box2(-1, -2, 1, -4));

            playAgainButton.Clicked += StartGame;
            quitButton.Clicked += QuitGame;
            mainMenuButton.Clicked += MainMenu;
        }
Example #2
-3
        public StartMenu(Renderer renderer, AppWindow app)
        {
            appWindow = app;
            startGameButton = new Button(renderer.CreateTextureFromFile("start.png"), new OpenTK.Box2(-1, 1, 1, -1));
            quitButton = new Button(renderer.CreateTextureFromFile("quit.png"), new OpenTK.Box2(-1, -2, 1, -4));

            startGameButton.Clicked += StartGame;
            quitButton.Clicked += QuitGame;
        }