public VolumeBar(Gfx2D line, string WheelSpriteName, int BarSize, Action <float> scrollAction) { Line = line; Interval = Line.Bound.Width - BarSize; ScrollAction = scrollAction; Wheel = new Gfx2D(WheelSpriteName, new Rectangle(Line.Pos.X + Interval, Line.Pos.Y, BarSize, Line.Bound.Height)); }
public static void Draw(Gfx2D gfx, params Color[] cs) { for (int i = 0; i < cs.Length; i++) { Draw(gfx, cs[i]); } }
public static void Vignette(Rectangle Bound, float opacity) { Lighter = new Gfx2D("Light", Bound); Lighter.Draw(Color.White * opacity); }
public static void Absolute(Rectangle Bound, Color c) { Lighter = new Gfx2D("WhiteSpace", Bound); Lighter.Draw(c); }
public static void DrawFullScreen(string SpriteName, Color c) { Gfx2D g = new Gfx2D(SpriteName, FullScreen); g.Draw(c); }
public static void Draw(Gfx2D gfx, Color c) => spriteBatch.Draw(gfx.Texture, new Rectangle(gfx.Pos.X + (gfx.ROrigin.X * gfx.Bound.Width) / gfx.Texture.Width, gfx.Pos.Y + (gfx.ROrigin.Y * gfx.Bound.Height) / gfx.Texture.Height, gfx.Bound.Width, gfx.Bound.Height), null, c, gfx.Rotate, Method2D.PtV(gfx.ROrigin), SpriteEffects.None, 0);
public static void Draw(Gfx2D gfx) => Draw(gfx, Color.White);