예제 #1
0
        // ----------------------------------------------------------

        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);
            }
        }
예제 #2
0
 public DisplayIcon(DisplayIcon i)
 {
     icon = i.icon;
     rect = i.rect;
 }
예제 #3
0
 public DisplayCaption(DisplayIcon i)
 {
     icon        = i;
     textCaption = null;
 }
예제 #4
0
 public DisplayCaption(string title)
 {
     icon        = null;
     textCaption = title;
 }
예제 #5
0
 public DisplayCaption(Surface src, Point p)
 {
     icon        = new DisplayIcon(src, p);
     textCaption = null;
 }
예제 #6
0
 public DisplayCaption(Surface src, Rectangle r)
 {
     icon        = new DisplayIcon(src, r);
     textCaption = null;
 }
예제 #7
0
 public DisplayCaption(string title, DisplayIcon i)
 {
     icon        = i;
     textCaption = title;
 }
예제 #8
0
 public DisplayCaption(string title, Surface src, Point p)
 {
     icon        = new DisplayIcon(src, p);
     textCaption = title;
 }
예제 #9
0
 public DisplayCaption(string title, Surface src, Rectangle r)
 {
     icon        = new DisplayIcon(src, r);
     textCaption = title;
 }