public virtual void load(ContentManager content, SpriteFont font) { highlighter.load(content); loadAlignment(font); if (hitBox.IsEmpty) { if (highlighter == null) { hitBox = new Rectangle((int)position.X, (int)position.Y, (int)font.MeasureString(text).X, (int)font.MeasureString(text).Y); } else { hitBox = highlighter.BoundingBox; } } }
public virtual void load(ContentManager content) { texture = content.Load <Texture2D>(asset); highlighter.load(content); selector.load(content); if (hitBox.IsEmpty) { if (highlighter == null) { hitBox = new Rectangle((int)position.X, (int)position.Y, texture.Width, texture.Height); } else { hitBox = highlighter.BoundingBox; } } }