protected void initialize(int weapon, int newRank, bool battle_scene) { Timer_Max = 97; if (battle_scene) { texture = Global.Content.Load <Texture2D>(@"Graphics/Windowskins/Combat_Popup"); } else { Window = new System_Color_Window(); Window.width = WIDTH; Window.height = 32; } // Text Text = new TextSprite( Config.UI_FONT, Global.Content, "White", new Vector2(8, 8), "Weapon Level increased to "); // Weapon rank Rank = new TextSprite(); Rank.loc = Text.loc + new Vector2(Text.text_width, 0); Rank.SetFont(Config.UI_FONT + "L", Global.Content, "Blue", Config.UI_FONT); Rank.text = TactileLibrary.Data_Weapon.WLVL_LETTERS[newRank]; // Weapon type icon Icon = new Weapon_Type_Icon(); Icon.index = weapon; Icon.loc = Rank.loc + new Vector2(Rank.text_width, 0); }
public WeaponTriangleHelpTypes( WeaponType type, WeaponType advType, WeaponType disType) { var icon = new Weapon_Type_Icon(); icon.loc = new Vector2(0, 0); icon.offset = icon.size / 2; icon.index = type.IconIndex; Icon1 = icon; var adv_icon = new Weapon_Type_Icon(); adv_icon.loc = new Vector2(12, 20); adv_icon.offset = adv_icon.size / 2; adv_icon.index = advType.IconIndex; Icon2 = adv_icon; if (disType != null) { var dis_icon = new Weapon_Type_Icon(); dis_icon.loc = new Vector2(-12, 20); dis_icon.offset = dis_icon.size / 2; dis_icon.index = disType.IconIndex; Icon3 = dis_icon; } }
public Weapon_Level_Gauge(int type) { WLvl_Icon = new Weapon_Type_Icon(); this.type = type; WLvl_Icon.loc = new Vector2(8, 8); WLvl_Bar = new Stat_Bar(); WLvl_Bar.loc = new Vector2(24, 16); WLvl_Bar.offset = new Vector2(-2, 0); WLvl_Bar.bar_width = WLVL_BAR_WIDTH; initialize_letter(); }
protected void set_text(TactileLibrary.Data_Equipment item, Game_Unit unit, bool battle_scene) { int x = 8; Icon.loc = new Vector2(x, 8); if (((TactileLibrary.Data_Item)item).Stat_Boost[(int)TactileLibrary.Boosts.WLvl] > 0 || ((TactileLibrary.Data_Item)item).Stat_Boost[(int)TactileLibrary.Boosts.WExp] > 0) { var weapon = unit.actor.items[unit.actor.equipped - 1].to_weapon; x += 16; WLvl_Icon = new Weapon_Type_Icon(); WLvl_Icon.index = unit.actor.valid_weapon_type_of(weapon).IconIndex; WLvl_Icon.loc = new Vector2(x, 8); } x += 17; A_Name = new TextSprite(); A_Name.loc = new Vector2(x, 8); A_Name.SetFont(Config.UI_FONT, Global.Content, battle_scene ? "CombatBlue" : "White"); A_Name.text = "" + ((TactileLibrary.Data_Item)item).Boost_Text; string pow = ""; // Changes POW to relevant switch (unit.actor.power_type()) { case Power_Types.Strength: pow = "Strength"; break; case Power_Types.Magic: pow = "Magic"; break; case Power_Types.Power: pow = "Power"; break; } A_Name.text = Regex.Replace(A_Name.text, @"POW", pow); x += Font_Data.text_width(A_Name.text, Config.UI_FONT) + 1; Broke = new TextSprite(); Width = x + 8 + (x % 8 != 0 ? (8 - x % 8) : 0); }