Ejemplo n.º 1
0
 public static void DrawLight(DrawingLayer d, Color color, float opacity, LightMode lightMode)
 {
     if (lightMode == LightMode.Absolute)
     {
         DrawingLayer AbsoluteLightLayer = new DrawingLayer("WhiteSpace", d.GetBound());
         AbsoluteLightLayer.Draw(color * opacity);
     }
     else if (lightMode == LightMode.Vignette)
     {
         DrawingLayer AbsoluteLightLayer = new DrawingLayer("Light", d.GetBound());
         AbsoluteLightLayer.Draw(color * opacity);
     }
 }
Ejemplo n.º 2
0
        public ScrollBar(DrawingLayer frame, string BarSpriteName, int BarSize, bool is_vertical, Action ScrollAction)
        {
            Frame      = frame;
            isVertical = is_vertical;
            if (isVertical)
            {
                Interval = Frame.GetBound().Height - BarSize;
            }
            else
            {
                Interval = Frame.GetBound().Width - BarSize;
            }

            ScrollEvent += ScrollAction;

            if (is_vertical)
            {
                Bar = new DrawingLayer(BarSpriteName, new Rectangle(Frame.GetPos(), new Point(Frame.GetBound().Width, BarSize)));
            }
            else
            {
                Bar = new DrawingLayer(BarSpriteName, new Rectangle(Frame.GetPos().X + Interval, Frame.GetPos().Y, BarSize, Frame.GetBound().Height));
            }
        }
Ejemplo n.º 3
0
 public static bool JustdidRightClick(DrawingLayer s)
 {
     return(JustdidRightClick() && s.GetBound().Contains(GetPos()));
 }
Ejemplo n.º 4
0
 public static bool IsOn(DrawingLayer d)
 {
     return(d.GetBound().Contains(GetPos()));
 }
Ejemplo n.º 5
0
        public static void DrawAddon(Camera2D cam, DrawingLayer d, Color color, float opacity, string LayerName)
        {
            DrawingLayer AddonLayer = new DrawingLayer(LayerName, d.GetBound());

            AddonLayer.Draw(cam, color * opacity);
        }
Ejemplo n.º 6
0
        private void DrawEachMenuBox(DrawingLayer d, Color EdgeColor, Color InnerColor)        //테두리와 내부를 별도로 그리기 위한 일회성 메소드.
        {
            d.Draw(EdgeColor);
            DrawingLayer Inner = new DrawingLayer("Light", new Rectangle(d.GetPos().X + EdgePixelSize, d.GetPos().Y + EdgePixelSize, d.GetBound().Width - 2 * EdgePixelSize, d.GetBound().Height - 2 * EdgePixelSize));

            Inner.Draw(InnerColor);
        }
Ejemplo n.º 7
0
 public void AttachTo(DrawingLayer d)
 {
     drawingLayer.SetPos(Method2D.Add(d.GetBound().Location, Vector));
 }