예제 #1
0
        public Control()
        {
            pBox=	new Box(Point.ORIGIN, Size.NO_SIZE);
            pParent=	null;
            children=	new List<Control>();
            oldMouse=	new MouseState();
            bHover=	false;
            click=	0;
            pVisible=	true;
            pEnabled=	true;
            pBackColors=	ColorPacket.DEFAULT;

            eonRelocate=	null;
            eonResize=	null;
            eonParentChanged=	null;
            eonBoxChanged=	null;
            eonWindowResize=	null;
            eonGuiAdded=	null;
            eonMouseEnter=	null;
            eonMouseLeave=	null;
            eonMouseClick=	null;
            eonMouseHover=	null;
            eonKeyPress=	null;
            eonEnabledChanged=	null;
            eonVisibleChanged=	null;
            eonGuiOpen=	null;
            eonGuiClose=	null;
        }
        // Renders a rectangle-box thingy
        public override void render(Box rect)
        {
            // Variables
            Sdx.Graphics	graphics=	form.CreateGraphics();

            switch((byte)(renderType))
            {
                case 1:
                    graphics.FillRectangle(
                        new Sdx.SolidBrush(Sdx.Color.FromArgb(renderColor.a, renderColor.r, renderColor.g, renderColor.b)),
                        new Sdx.RectangleF(rect.position.x, rect.position.y, rect.size.width, rect.size.height)
                    );
                    break;
                case 2:
                    graphics.DrawRectangle(
                        new Sdx.Pen(renderColor.toSysColor()),
                        rect.position.x, rect.position.y, rect.size.width, rect.size.height
                    );
                    break;
            }
        }
 public virtual void render(Box box)
 {
     render(ref box);
 }
 // Renders a box
 public abstract void render(ref Box box);
예제 #5
0
 public RenderableImage(BaseImage image, Box pmRenderRect)
     : this(image, pmRenderRect, TexRectangle.full)
 {
 }
예제 #6
0
 public RenderableImage(BaseImage image, Box pmRenderRect, TexRectangle pmTexRect)
 {
     img=	image;
     renderRect=	pmRenderRect;
     texRect=	pmTexRect;
 }
예제 #7
0
 public Hexagon(Box pmBox, float pmSlantHeight)
 {
     box=	pmBox;
     slantHeight=	pmSlantHeight;
 }