public void CreateRepairPopup(int inventoryTarget) { // Maybe make a sparkle on the use count for the repaired item, and update its value??? //Yeti Stats_Popup = new Item_Repair_Popup( this.Actor.items[inventoryTarget].Id, this.Actor.items[inventoryTarget].is_item, 128); Stats_Popup.loc = new Vector2((Config.WINDOW_WIDTH - 80) - Stats_Popup.width / 2, Config.WINDOW_HEIGHT - 56); Stats_Popup.stereoscopic = Config.PREPITEM_WINDOW_DEPTH; }
private void CreateStatsWindow(bool createPopup = false, Data_Item item = null) { // Create a unit for the stats window Global.game_map.add_actor_unit(Constants.Team.PLAYER_TEAM, Config.OFF_MAP, ActorId, ""); Stats_Window = new Prep_Stats_Window(Global.game_map.last_added_unit); Stats_Window.loc = new Vector2(Config.WINDOW_WIDTH - 160, Config.WINDOW_HEIGHT - 136); if (createPopup) { Stats_Popup = new Stat_Boost_Popup( item.Id, !item.is_weapon, Global.game_map.last_added_unit, -1, true); Stats_Popup.loc = new Vector2( (Config.WINDOW_WIDTH - 80) - Stats_Popup.width / 2, Config.WINDOW_HEIGHT - 56); Stats_Popup.stereoscopic = Config.PREPITEM_WINDOW_DEPTH; } Global.game_map.completely_remove_unit(Global.game_map.last_added_unit.id); }
private void FinishUsingItem() { Stats_Popup = null; this.Actor.use_item((Window as Window_Command_Item).redirect()); if (this.Actor.has_items) { int index = Window.index; CreateItemWindow(ActorId, Window.loc); CreateStatsWindow(); Window.immediate_index = index; UsingItem = false; Activate(); } else { OnCanceled(new EventArgs()); } }