Beispiel #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);
     }
 }
Beispiel #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));
            }
        }
Beispiel #3
0
 public static bool JustdidRightClick(DrawingLayer s)
 {
     return(JustdidRightClick() && s.GetBound().Contains(GetPos()));
 }
Beispiel #4
0
 public static bool IsOn(DrawingLayer d)
 {
     return(d.GetBound().Contains(GetPos()));
 }
Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #7
0
 public void AttachTo(DrawingLayer d)
 {
     drawingLayer.SetPos(Method2D.Add(d.GetBound().Location, Vector));
 }