protected virtual void update_help_loc() { Help_Window.set_loc(loc + new Vector2(0, 16 + (index - scroll) * 16)); }
protected void move_to(string index) { if (false) //!Help_Data[page].ContainsKey(index)) //Debug { reset_help_index(); } else { Help_Index = index; } string help_label = StatusNodes[page].ActiveNode.HelpLabel; var regex = new System.Text.RegularExpressions.Regex(@"\d+$"); string label = regex.Replace(help_label, ""); switch (label) { case "Name": string description = unit.actor.description; #if !MONOGAME && DEBUG if (Global.scene.is_unit_editor) { string identifier = ""; foreach (KeyValuePair <string, int> ident in Global.game_map.unit_identifiers) { if (ident.Value == unit.id) { identifier = ident.Key; break; } } description = string.Format("{0}\n{1}, {2}", description, unit.id, identifier); } #endif Help_Window.set_text(description); break; case "Class": Help_Window.set_text(unit.actor.actor_class.Description); break; case "Pow": switch (unit.actor.power_type()) { case Power_Types.Strength: Help_Window.set_text(Global.system_text["Status Help Str"]); break; case Power_Types.Magic: Help_Window.set_text(Global.system_text["Status Help Mag"]); break; case Power_Types.Power: Help_Window.set_text(Global.system_text["Status Help Pow"]); break; } break; case "Item": Help_Window.set_item(unit.items[Convert.ToInt32(help_label.Substring(4, 1)) - 1], unit.actor); break; case "Skill": Help_Window.set_text(Global.data_skills[unit.actor.skills[ Convert.ToInt32(help_label.Substring(5, 1)) - 1]].Description.Replace("|", "\n")); break; case "Item Skill": Help_Window.set_text(Global.data_skills[unit.actor.item_skills[ Convert.ToInt32(help_label.Substring(10, 1)) - 1]].Description.Replace("|", "\n")); break; case "Status": Help_Window.set_text(Global.data_statuses[unit.actor.states[ Convert.ToInt32(help_label.Substring(6, 1)) - 1]].Description.Replace("|", "\n")); break; default: string text_key = string.Format("Status Help {0}", help_label); if (Global.system_text.ContainsKey(text_key)) { Help_Window.set_text(Global.system_text[text_key]); } else { Help_Window.set_text(help_label); } break; } Help_Window.set_loc(StatusNodes[page].ActiveNode.loc); //Help_Window.set_loc(Help_Data[page][Help_Index].Loc + Help_Data[page][Help_Index].Offset); }