Exemplo n.º 1
0
Arquivo: UI.cs Projeto: jidamy/damsan
 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));
 }
Exemplo n.º 2
0
 public static void Draw(Gfx2D gfx, params Color[] cs)
 {
     for (int i = 0; i < cs.Length; i++)
     {
         Draw(gfx, cs[i]);
     }
 }
Exemplo n.º 3
0
 public static void Vignette(Rectangle Bound, float opacity)
 {
     Lighter = new Gfx2D("Light", Bound);
     Lighter.Draw(Color.White * opacity);
 }
Exemplo n.º 4
0
 public static void Absolute(Rectangle Bound, Color c)
 {
     Lighter = new Gfx2D("WhiteSpace", Bound);
     Lighter.Draw(c);
 }
Exemplo n.º 5
0
        public static void DrawFullScreen(string SpriteName, Color c)
        {
            Gfx2D g = new Gfx2D(SpriteName, FullScreen);

            g.Draw(c);
        }
Exemplo n.º 6
0
 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);
Exemplo n.º 7
0
 public static void Draw(Gfx2D gfx) => Draw(gfx, Color.White);