public void cancel_trading() { create_command_window(Supply_Command_Window.All); var command = Restocking ? Supply_Command_Window.Restock : (Giving ? Supply_Command_Window.Give : Supply_Command_Window.Take); Command_Window.index = (int)command - 1; if (Taking) { Command_Window.current_cursor_loc = Supply_Window.current_cursor_loc - new Vector2(0, 16 * Supply_Window.scroll); } else { Command_Window.current_cursor_loc = Item_Window.current_cursor_loc; } //Item_Window.active = false; // unneeded since this window is about to be replaced //Debug Supply_Window.active = false; Giving = false; Taking = false; Restocking = false; Item_Window.restore_equipped(); unit.actor.staff_fix(); refresh_item_window(); HelpFooter.refresh(this.unit, null); }
protected override void supply_window_index_changed() { if (!Supply_Window.can_take) { HelpFooter.refresh(this.unit, null); Owner.text = "Owner: ---"; Owner.SetTextFontColor(7, "Grey"); } else { HelpFooter.refresh( this.unit, Supply_Window.active_item.get_item()); string name; if (Supply_Window.active_item.Convoy) { name = "Convoy"; Owner.SetTextFontColor(7, "Yellow"); } else { name = Global.game_actors[Supply_Window.active_item.ActorId].name; Owner.SetTextFontColor(7, "White"); } Owner.text = string.Format("Owner: {0}", name); } }
protected override void supply_window_index_changed() { if (!Supply_Window.can_take) { HelpFooter.refresh(this.unit, null); } else { HelpFooter.refresh( this.unit, Supply_Window.active_item.get_item()); } }