Beispiel #1
0
        public override void Paint(IDrawebleContextSolver context)
        {
            IGraphics gp = context.CreateGraphics();

            gp.Push();
            if (IsDraweble)
            {
                gp.Material(Material.Gui);
                gp.DefuseColor(new Color4(0xF6, 0xF6, 0xF6, 0xFF));
                gp.DrawRectangle(this.Position.Vector3(), this.PositionMax.Vector3());
                gp.DefuseColor(Color4.Black);
                gp.DrawSolidRectangle(this.Position.Vector3(), this.PositionMax.Vector3());
            }
            gp.Translate(this.Position.Vector3());

            gp.PushClip();
            gp.MultClip(this.DisplayPosition.Vector2() + new Vector2(1, 1), this.DisplayPositionMax.Vector2() - new Vector2(1, 1));
            for (int i = (Items.Count - 1); i >= 0; i--)
            {
                Widget o = Items[i];
                if (!o.IsVisable)
                {
                    continue;
                }
                o.Paint(context);
            }

            gp.PopClip();
            gp.Pop();
        }
Beispiel #2
0
        public override void Paint(IDrawebleContextSolver context)
        {
            IGraphics gp = context.CreateGraphics();


            gp.Push();
            gp.Translate(new Point(0, 1).Vector3());
            gp.Material(Material.Gui);
            gp.DefuseColor(Color4.White);
            gp.DrawRectangle(this.Position.Vector3(), this.PositionMax.Vector3());
            gp.DefuseColor(new Color4(0xDC, 0xDC, 0xDC, 0xFF));
            gp.DrawSolidRectangle(this.Position.Vector3(), this.PositionMax.Vector3());

            gp.LineWidth = 3f;
            if (Checked == true)
            {
                gp.DefuseColor(Color4.Black);
                gp.DrawLine((this.Position + new Point(5, 5)).Vector3(), (this.PositionMax + new Point(-5, -5)).Vector3());
                gp.DrawLine((this.Position + new Point(this.Width - 5, 5)).Vector3(), (this.PositionMax - new Point(this.Width - 5, 5)).Vector3());
            }

            gp.DrawText(Text, this.Position + new Point(32, 0), new Color4(0x66, 0x66, 0x66, 0xFF), EE.СurrentFont, FontSize);



            gp.LineWidth = 1f;
            gp.Pop();
        }
Beispiel #3
0
        public override void Paint(IDrawebleContextSolver context)
        {
            //IGraphics gp = context.CreateGraphics();
            //gp.Push();


            //gp.Pop();
        }
Beispiel #4
0
        public override void Paint(IDrawebleContextSolver context)
        {
            IGraphics gp = context.CreateGraphics();


            gp.Push();
            gp.Translate(new Point(0, 1).Vector3());
            gp.Material(Material.Gui);
            gp.DefuseColor(Color4.White);

            gp.DefuseColor(new Color4(0xDC, 0xDC, 0xDC, 0xFF));


            gp.LineWidth = 3f;

            gp.DrawText(Text, this.Position, new Color4(0x66, 0x66, 0x66, 0xFF), EE.СurrentFont, FontSize);

            gp.LineWidth = 1f;
            gp.Pop();
        }
Beispiel #5
0
 public abstract void Paint(IDrawebleContextSolver context);
Beispiel #6
0
        public override void Paint(IDrawebleContextSolver context)
        {
            IGraphics gp = context.CreateGraphics();

            if (IsMouseDown == true)
            {
                gp.Material(Material.Gui);
                gp.Push();
                gp.Translate(new Point(0, 1).Vector3());
                gp.LineWidth = 1f;
                gp.DefuseColor(Color4.Aqua);
                gp.DrawRectangle(this.Position.Vector3(), this.PositionMax.Vector3());
                gp.DefuseColor(new Color4(0xDC, 0xDC, 0xDC, 0xFF));
                gp.DrawSolidRectangle(this.Position.Vector3(), this.PositionMax.Vector3());
                gp.DefuseColor(Color4.White);
                gp.DrawLine((this.Position + new Point(1, 1)).Vector3(), (this.Position + new Point(1 + this.Width - 2, 1)).Vector3());
                gp.DrawText(this.Text, this.Position + addd, new Color4(0x66, 0x66, 0x66, 0xFF), EE.СurrentFont, FontSize);
                gp.LineWidth = 1f;
                gp.Pop();

                return;
            }


            if (!this.IsMouseMove)
            {
                gp.Material(Material.Gui);
                gp.Push();
                gp.Translate(new Point(0, 1).Vector3());
                gp.LineWidth = 1f;
                gp.DefuseColor(new Color4(0xF6, 0xF6, 0xF6, 0xFF));

                if (!Padded)
                {
                    gp.DrawRectangle(this.Position.Vector3(), this.PositionMax.Vector3());

                    gp.DefuseColor(new Color4(0xDC, 0xDC, 0xDC, 0xFF));
                    gp.DrawSolidRectangle(this.Position.Vector3(), this.PositionMax.Vector3());

                    gp.DefuseColor(Color4.White);
                    gp.DrawLine((this.Position + new Point(1, 1)).Vector3(), (this.Position + new Point(1 + this.Width - 2, 1)).Vector3());
                }


                gp.DrawText(this.Text, this.Position + addd, new Color4(0x66, 0x66, 0x66, 0xFF), EE.СurrentFont, FontSize);
                gp.LineWidth = 1f;
                gp.Pop();
                //gp.Push();
                //gp.LineWidth = 1f;
                //gp.DrawRectangle(this.Position, this.PositionMax, Color.Bytes(0xF6, 0xF6, 0xF6, 0xFF));

                //gp.DrawSolidRectangle(this.Position, this.PositionMax, Color.Bytes(0xDC, 0xDC, 0xDC, 0xFF));
                //gp.DrawLine(this.Position + new Point(1,1), this.Position + new Point(1 + this.Width - 2, 1),Color.White);
                //gp.DrawText(this.Text, this.Position + addd, Color.Bytes(0x66, 0x66, 0x66), GameEngine.CurrentFont, FontSize);
                //gp.LineWidth = 1f;
                //gp.Pop();
            }
            else
            {
                gp.Material(Material.Gui);
                gp.Push();
                gp.Translate(new Point(0, 1).Vector3());
                gp.LineWidth = 1f;
                gp.DefuseColor(Color4.White);
                gp.DrawRectangle(this.Position.Vector3(), this.PositionMax.Vector3());
                gp.DefuseColor(new Color4(0xDC, 0xDC, 0xDC, 0xFF));
                gp.DrawSolidRectangle(this.Position.Vector3(), this.PositionMax.Vector3());
                gp.DefuseColor(Color4.White);
                gp.DrawLine((this.Position + new Point(1, 1)).Vector3(), (this.Position + new Point(1 + this.Width - 2, 1)).Vector3());
                gp.DrawText(this.Text, this.Position + addd, new Color4(0x66, 0x66, 0x66, 0xFF), EE.СurrentFont, FontSize);
                gp.LineWidth = 1f;
                gp.Pop();
                //gp.Push();
                //gp.LineWidth = 1f;
                //gp.DrawRectangle(this.Position, this.PositionMax, Color.White);

                //gp.DrawSolidRectangle(this.Position, this.PositionMax, Color.Bytes(0xDC, 0xDC, 0xDC,0xFF));

                //gp.DrawText(this.Text, this.Position + addd, Color.Bytes(0x66, 0x66, 0x66, 0xFF), GameEngine.CurrentFont, FontSize);
                //gp.LineWidth = 1f;
                //gp.Pop();
            }
        }