///----------------------------------------------------------------- public void Clear() { forceDirtyPass = index != 0; index = 0; positions.Clear(); colors.Clear(); }
public override void Draw(BufferContainer buffer) { buffer.Clear(); FrameArea(buffer); DrawLeftPane(buffer); DrawRightPane(buffer); var gold = PriceString(Game.Hero.Gold); WriteAt(buffer, 1, MaxHeight - 3, "Gold:"); WriteAt(buffer, 7, MaxHeight - 3, gold, ConsoleColor.DarkYellow); // Options for Item Dialog var helpText = ""; if (currentAction == StorageLocationAction.None) { var transferVerb = "Transfer"; helpText = $"[↔] Select column, [↕] Select source, [{transferVerb[0]}] {transferVerb}, [Esc] Exit"; } if (currentAction != StorageLocationAction.None) { helpText = $"[A-Z] Select item, [Esc/T] Cancel tansfer"; } WriteAt(buffer, 1, MaxHeight - 2, $"{helpText}", ConsoleColor.DarkGray); }
public override void Draw(BufferContainer buffer) { buffer.Clear(); FrameArea(buffer); // Header for Item Dialog var lineCounter = 0; WriteAt(buffer, 0, lineCounter++, Command.Query(Location)); // Options for Item Dialog var selectItem = "[A-Z] Select item"; var helpText = CanSwitchLocations ? ", [Tab] Switch view" : ""; WriteAt(buffer, 0, lineCounter++, $"{selectItem}{helpText}", ConsoleColor.Gray); // List of Items DrawItems(buffer, 0, lineCounter + 2, GetItems(Game), item => Command.CanSelect(item)); }