internal void MoveSelectedUp() { selectedElement.Update(); counter += list.Length - 1; int index = counter % list.Length; selectedElement = Elements[list[index]]; selectedElement.UpdateReverseColours(); }
internal void MoveSelectedUp() { StopAnimation(); selectedElement.Update(); counter += list.Length - 1; int index = counter % list.Length; selectedElement = Elements[list[index]]; AnimateMenuItem(); }
public void Init() { Render(); Elements["alert"].Clear(); Console.SetCursorPosition(nickname.PosX, nickname.PosY); Console.CursorVisible = true; exit = false; do { pressedKey = Console.ReadKey(true); switch (pressedKey.Key) { case ConsoleKey.Escape: exit = true; ExitAction(); pressedKey = new ConsoleKeyInfo(); break; case ConsoleKey.Enter: EnterAction(); break; case ConsoleKey.Backspace: if (nick.Length > 0) { nickname.Lines[0] = nick.Remove(nick.Length - 1, 1); nick = nickname.Lines[0]; nickname.Update(); Console.SetCursorPosition(border.PosX + 2 + nickname.Lines[0].Length, border.PosY + 2); } Console.SetCursorPosition(border.PosX + 2 + nickname.Lines[0].Length, border.PosY + 2); break; default: if (char.IsLetterOrDigit(pressedKey.KeyChar)) { if (nick.Length < nickname.Width) { nick += pressedKey.KeyChar; nickname.Lines[0] = nick; } nickname.Update(); } break; } } while (!exit); }