private void Up() { this.index--; if (this.index < 0) { this.index = this.items.Length - 1; } this.choice = this.items[this.index]; }
private void Down() { this.index++; if (this.index >= this.items.Length) { this.index = 0; } this.choice = this.items[this.index]; }
public LoadMenu(DoomMenu menu, string name, int titleX, int titleY, int firstChoice, params TextBoxMenuItem[] items) : base(menu) { this.name = new[] { name }; this.titleX = new[] { titleX }; this.titleY = new[] { titleY }; this.items = items; this.index = firstChoice; this.choice = items[this.index]; }