Beispiel #1
0
        public virtual void DrawDebugOutlines(Controls.ControlBase control)
        {
            m_Renderer.DrawColor = control.PaddingOutlineColor;
            Rectangle inner = new Rectangle(control.Bounds.Left + control.Padding.Left,
                                            control.Bounds.Top + control.Padding.Top,
                                            control.Bounds.Width - control.Padding.Right - control.Padding.Left,
                                            control.Bounds.Height - control.Padding.Bottom - control.Padding.Top);

            m_Renderer.DrawLinedRect(inner);

            m_Renderer.DrawColor = control.MarginOutlineColor;
            Rectangle outer = new Rectangle(control.Bounds.Left - control.Margin.Left,
                                            control.Bounds.Top - control.Margin.Top,
                                            control.Bounds.Width + control.Margin.Right + control.Margin.Left,
                                            control.Bounds.Height + control.Margin.Bottom + control.Margin.Top);

            m_Renderer.DrawLinedRect(outer);

            m_Renderer.DrawColor = control.BoundsOutlineColor;
            m_Renderer.DrawLinedRect(control.Bounds);
            if (control is Controls.Label label)
            {
                m_Renderer.DrawColor = control.PaddingOutlineColor;
                inner = new Rectangle(control.Bounds.Left + label.TextPadding.Left,
                                      control.Bounds.Top + label.TextPadding.Top,
                                      control.Bounds.Width - label.TextPadding.Right - label.TextPadding.Left,
                                      control.Bounds.Height - label.TextPadding.Bottom - label.TextPadding.Top);
                m_Renderer.DrawLinedRect(inner);
            }
        }
Beispiel #2
0
        public virtual void DrawDebugOutlines(Control.ControlBase control)
        {
            m_Renderer.DrawColor = control.PaddingOutlineColor;
            Rectangle inner = control.Bounds;

            inner.Deflate(control.Padding);
            m_Renderer.DrawLinedRect(inner);

            m_Renderer.DrawColor = control.MarginOutlineColor;
            Rectangle outer = control.Bounds;

            outer.Inflate(control.Margin);
            m_Renderer.DrawLinedRect(outer);

            m_Renderer.DrawColor = control.BoundsOutlineColor;
            m_Renderer.DrawLinedRect(control.Bounds);
        }
Beispiel #3
0
        public virtual void DrawDebugOutlines(Control.ControlBase control)
        {
            renderer.DrawColor = control.PaddingOutlineColor;
            Rectangle inner = new Rectangle(control.Bounds.Left + control.Padding.Left,
                                            control.Bounds.Top + control.Padding.Top,
                                            control.Bounds.Width - control.Padding.Right - control.Padding.Left,
                                            control.Bounds.Height - control.Padding.Bottom - control.Padding.Top);

            renderer.DrawLinedRect(inner);

            renderer.DrawColor = control.MarginOutlineColor;
            Rectangle outer = new Rectangle(control.Bounds.Left - control.Margin.Left,
                                            control.Bounds.Top - control.Margin.Top,
                                            control.Bounds.Width + control.Margin.Right + control.Margin.Left,
                                            control.Bounds.Height + control.Margin.Bottom + control.Margin.Top);

            renderer.DrawLinedRect(outer);

            renderer.DrawColor = control.BoundsOutlineColor;
            renderer.DrawLinedRect(control.Bounds);
        }
Beispiel #4
0
        /// <summary>
        /// Renders over the actual control (overlays).
        /// </summary>
        /// <param name="skin">Skin to use.</param>
        protected override void RenderOver(Skin.SkinBase skin)
        {
            if (!m_DrawHover)
            {
                return;
            }

            Renderer.RendererBase render = skin.Renderer;
            render.DrawColor = new Color(20, 255, 200, 255);
            render.DrawFilledRect(RenderBounds);

            if (m_HoverRect.Width == 0)
            {
                return;
            }

            render.DrawColor = new Color(100, 255, 200, 255);
            render.DrawFilledRect(m_HoverRect);

            render.DrawColor = new Color(200, 255, 200, 255);
            render.DrawLinedRect(m_HoverRect);
        }
Beispiel #5
0
        /// <summary>
        /// Renders over the actual control (overlays).
        /// </summary>
        /// <param name="skin">Skin to use.</param>
        protected override void renderOver(Skin.SkinBase skin)
        {
            if (!drawHover)
            {
                return;
            }

            Renderer.RendererBase render = skin.Renderer;
            render.DrawColor = Color.FromArgb(20, 255, 200, 255);
            render.DrawFilledRect(RenderBounds);

            if (hoverRect.Width == 0)
            {
                return;
            }

            render.DrawColor = Color.FromArgb(100, 255, 200, 255);
            render.DrawFilledRect(hoverRect);

            render.DrawColor = Color.FromArgb(200, 255, 200, 255);
            render.DrawLinedRect(hoverRect);
        }