public TextShow(Vector2 location, blockType type) : base(location, (int)Game1.title_font.MeasureString(BlockData.getName(type)).X + 8 + 4 + 4, (int)Game1.title_font.MeasureString(BlockData.getName(type)).Y + 8 + 4 + 4) { blockData = new BlockData(type); font = Game1.title_font; inside_color = Color.Yellow; border_colors = blockData.borderColours; text_color = blockData.textColour; text = blockData.name; canBeDraged = true; sprite_height = (int)font.MeasureString(text).Y; sprite_length = (int)font.MeasureString(text).X; data = new Color[width * height]; data_to_convert = new Color[width, height]; border_size = 8; generateTextureComplex(new int[4] { 4, 4, 4,4 }, border_colors, inside_color); }
public static string getName(blockType type) { BlockData t = new BlockData(type); return t.name; }