Example #1
0
        public SubmenuInfo(WormsGame game, GameMenu menu)
        {
            this.game = game;
            this.menu = menu;

            font = new QFont(new Font(game.DefaultFontFamily, 13f));
        }
Example #2
0
        public static void Main()
        {
            ColorConsole.SaveStatus();
            ColorConsole.Enable();

            Console.CursorVisible = false;
            Console.Clear();
            Console.Title     = "Worms Game";
            ColorConsole.Size = new Size(100, 40);

            WormsGame.Launch();

            ColorConsole.Disable();
            ColorConsole.RestoreStatus();
        }
Example #3
0
        private int submenu = 0; // hlavnĂ­ menu

        #endregion Fields

        #region Constructors

        public GameMenu(WormsGame game)
        {
            this.game = game;

            subInfo = new SubmenuInfo(game, this);

            items = new List<MenuItem>();
            font = new QFont(new Font(game.DefaultFontFamily, 28f));
            fontSelected = new QFont(new Font(game.DefaultFontFamily, 32f));

            AddMenuItem(
                new MenuItem("Play", null),
                new MenuItem("Options", null),
                new MenuItem("Score", null),
                new MenuItem("Info", null),
                new MenuItem("Exit", () => { game.Exit(); })
                );
        }