Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Snake
- {
- public static class Menu
- {
- public static void DrawMenu(IReadOnlyList<string> menuItems, int index)
- {
- for(int i = 0; i < menuItems.Count; i++)
- {
- if (i == index)
- {
- Console.BackgroundColor = ConsoleColor.Gray;
- Console.ForegroundColor = ConsoleColor.Black;
- Console.WriteLine(menuItems[i]);
- }
- else
- {
- Console.WriteLine(menuItems[i]);
- }
- Console.ResetColor();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement