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