Ejemplo n.º 1
0
        private void InitializeMenu()
        {
            _menu = new VerticalMenu(0, 150, _input);

            Color focusColor = new Color(251, 242, 0, 1);
            Color noFocusColor = new Color(0.14f, 0.57f, 0.14f, 1);

            Button startGame = new Button(
                delegate(object o, EventArgs e)
                {
                    _system.ChangeState("start_state");
                },
                new Text("Back To Start", _generalFont), focusColor, noFocusColor);

            Button exitGame = new Button(
                delegate(object o, EventArgs e)
                {
                    // Quit
                    System.Windows.Forms.Application.Exit();
                },
                new Text("Quit", _generalFont), focusColor, noFocusColor);

            _menu.AddButton(startGame);
            _menu.AddButton(exitGame);
        }
Ejemplo n.º 2
0
        private void InitializeMenu()
        {
            menuFont = new Font(textureManager.Get("menu_font"), FontParser.Parse("menuFont.fnt"));
            menu = new VerticalMenu(0, -100, input, new Color(1, 1, 1, 1), new Color(0, 0, 1, 1));

            // Create start, controls, exit for menu
            Button start = new Button(delegate(object sender, EventArgs e)
            {
                stateSystem.ChangeState("inner_game");
                ResetGameData();
            },
            new Text("Start", menuFont));

            Button controls = new Button(delegate(object sender, EventArgs e)
            {
                stateSystem.ChangeState("controls");
            },
            new Text("Controls", menuFont));

            Button exit = new Button(delegate(object sender, EventArgs e)
            {
                System.Windows.Forms.Application.Exit();
            },
            new Text("Exit", menuFont));

            menu.AddButton(start);
            menu.AddButton(controls);
            menu.AddButton(exit);
        }
Ejemplo n.º 3
0
        private void InitializeMenu()
        {
            _menu = new VerticalMenu(0, 150, _input);
            Button startGame = new Button(delegate(object o, EventArgs e) { _system.ChangeState("inner_game"); }, new Text("Start", _generalFont));
            Button gameSettings = new Button(delegate(object o, EventArgs e) { /*Go to settings */ }, new Text("Settings", _generalFont));
            Button exitGame = new Button(delegate(object o, EventArgs e) { /*Quit*/ System.Windows.Forms.Application.Exit(); }, new Text("Exit", _generalFont));

            _menu.AddButton(startGame);
            _menu.AddButton(gameSettings);
            _menu.AddButton(exitGame);
        }
Ejemplo n.º 4
0
        private void InitializeMenu()
        {
            _menu = new VerticalMenu(0, 150, _input);
            var startGame = new Button(delegate { _system.ChangeState("inner_game"); }, new Text("Start", _generalFont));
            var gameSettings = new Button(delegate
            {
                /* Go To Settings */
            }, new Text("Settings", _generalFont));
            var exitGame = new Button(delegate { Application.Exit(); }, new Text("Exit", _generalFont));

            _menu.AddButton(startGame);
            _menu.AddButton(gameSettings);
            _menu.AddButton(exitGame);
        }
Ejemplo n.º 5
0
        private void InitializeMenu()
        {
            _menu = new VerticalMenu(0, 150, _input);
            Button startGame = new Button(
                delegate(object o, EventArgs e)
                {
                    _system.ChangeState("inner_game");
                },
                new Text("Start", _generalFont));

            Button exitGame = new Button(
                delegate(object o, EventArgs e)
                {
                    // Quit
                    System.Windows.Forms.Application.Exit();
                },
                new Text("Exit", _generalFont));
            Button helpPage = new Button(
                delegate(object o, EventArgs e){
                    //change state to help page
                    _system.ChangeState("help_state");
                },
                new Text("Game Help", _generalFont));
            Button kabajie = new Button(
                delegate(object o, EventArgs e)
                {
                    //change state to help page
                    _system.ChangeState("kabajie");
                },
                new Text("Kabaji Egara", _generalFont));

            _menu.AddButton(startGame);
            _menu.AddButton(exitGame);
            _menu.AddButton(helpPage);
            _menu.AddButton(kabajie);
        }
Ejemplo n.º 6
0
        public void InitializeMenu()
        {
            _pauseMenu = new VerticalMenu(0, 150, _input);

            Color focusColor = new Color(251, 242, 0, 1);
            Color noFocusColor = new Color(0.14f, 0.57f, 0.14f, 1);

            Engine.Button quit = new Engine.Button(
                delegate(object o, EventArgs e)
                {
                    _system.ChangeState("start_state");
                },
                new Text("Quit Game", _infoFont), focusColor, noFocusColor);

            Engine.Button resume = new Engine.Button(
                delegate(object o, EventArgs e)
                {
                    _paused = false;
                },
                new Text("Resume", _infoFont), focusColor, noFocusColor);

            _pauseMenu.AddButton(quit);
            _pauseMenu.AddButton(resume);
        }