public override void set_text(string text, Vector2 offset = new Vector2()) { base.set_text(text); string[] text_ary = Help_String.Split('\n'); Arrow.loc = new Vector2(Font_Data.text_width(text_ary[text_ary.Length - 1], Tactile.Config.CONVO_FONT) + 12, (text_ary.Length - 1) * 16 + 8); }
public override void set_text(string text, Vector2 offset = new Vector2()) { Weapon_Data = null; Help_Text = new TextSprite(); Help_Text.loc = new Vector2(16, 4); Help_Text.draw_offset = offset; Help_Text.SetFont(Tactile.Config.UI_FONT, Global.Content, "White"); Help_Text.text = ""; Help_String = Regex.Replace(text, @"LVL_CAP", Global.ActorConfig.LvlCap.ToString()); int width = 32; string[] text_ary = Help_String.Split('\n'); foreach (string str in text_ary) { width = Math.Max(Font_Data.text_width(str, Tactile.Config.UI_FONT), width); } width = width + (width % 8 == 0 ? 0 : (8 - width % 8)) + 16; size = new Vector2(width, (Math.Max(1, Help_String.Split('\n').Length) + 1) * 16); }