// ---------------------------------------------------------- public void Blit(Surface src, Point p) { Prerender(); DisplayIcon i = icon; if (i == null && defaultIcon) { i = DisplaySettings.defaultIcon; } if (i != null) { Point pI = p; if (caption != null) { pI.Y += (caption.Height - i.Height) / 2; } i.Blit(src, pI); p.X += Compound.Padding + i.Width; } else if (sizeWithIcon) { p.X += Compound.Padding + Compound.IconSize.Width; } if (caption != null) { src.Blit(caption, p); } }
public DisplayIcon(DisplayIcon i) { icon = i.icon; rect = i.rect; }
public DisplayCaption(DisplayIcon i) { icon = i; textCaption = null; }
public DisplayCaption(string title) { icon = null; textCaption = title; }
public DisplayCaption(Surface src, Point p) { icon = new DisplayIcon(src, p); textCaption = null; }
public DisplayCaption(Surface src, Rectangle r) { icon = new DisplayIcon(src, r); textCaption = null; }
public DisplayCaption(string title, DisplayIcon i) { icon = i; textCaption = title; }
public DisplayCaption(string title, Surface src, Point p) { icon = new DisplayIcon(src, p); textCaption = title; }
public DisplayCaption(string title, Surface src, Rectangle r) { icon = new DisplayIcon(src, r); textCaption = title; }