Пример #1
0
        static void Main(string[] args)
        {
            // Introduction to the Game
            DialogueBox mazeIntroduction = new DialogueBox();

            mazeIntroduction.Create(new Point(1, 1), new Size(14, 14), ConsoleColor.White, ConsoleColor.Black, "Welcome to the Maze!");
            mazeIntroduction.Draw();


            //Box maze_area = new Box();
            //maze_area.Create(new Point(5, 5), new Size(100, 20), ConsoleColor.White, ConsoleColor.Black);
            //maze_area.Draw();

            List <string> items = new List <string>()
            {
                "Item1", "Item2", "Item3"
            };

            UserMenu menu = new UserMenu();

            menu.Create(items, new Point(5, 5), "Main Menu");
            while (true)
            {
                menu.Draw();

                if (menu.Update())
                {
                    Console.Write("Get Ready...");
                    break;
                }
            }

            Console.ReadLine();
        }
Пример #2
0
        static void Main(string[] args)
        {
            // Introduction to the Game
            DialogueBox mazeIntroduction = new DialogueBox();

            mazeIntroduction.Create(new Point(1, 1), new Size(10, 10), ConsoleColor.White, ConsoleColor.Black, "Welcome to the Maze!");
            mazeIntroduction.Draw();


            //Box maze_area = new Box();
            //maze_area.Create(new Point(5, 5), new Size(100, 20), ConsoleColor.White, ConsoleColor.Black);
            //maze_area.Draw();

            Console.ReadLine();
        }
Пример #3
0
        public void Draw()
        {
            UserMenuBox.Draw();

            for (int i = 0; i < MenuItems.Count; i++)
            {
                Console.SetCursorPosition(Position.X + 2, Position.Y + 3 + i);
                if (i == SelectedIndex)
                {
                    Console.ForegroundColor = SelectedColour;
                }
                else
                {
                    Console.ForegroundColor = TextColour;
                }

                Console.Write(MenuItems[i]);
            }
        }