Beispiel #1
0
 public override void CreateUI(GLEx g, int x, int y, LComponent component,
         LTexture[] buttonImage)
 {
     if (visible && goalPath != null)
     {
         g.SetLineWidth(lineWidth);
         g.GLBegin(GL.GL_LINE_STRIP);
         g.Draw(goalPath, color);
         g.GLEnd();
         g.ResetLineWidth();
         g.ResetColor();
     }
 }
Beispiel #2
0
 public override void Step(GLEx g, float x, float y, float progress,
         int index, int frame_0, LColor color_1, float alpha_2)
 {
     float cx = this.padding + 50, cy = this.padding + 50, angle = (MathUtils.PI / 180)
             * (progress * 360), innerRadius = (index == 1) ? 10
             : 25;
     if (path == null)
     {
         path = new Path(GetX() + x * scale, GetY() + y * scale);
     }
     else
     {
         path.Clear();
         path.Set(GetX() + x * scale, GetY() + y * scale);
     }
     path.LineTo(GetX()
             + ((MathUtils.Cos(angle) * innerRadius) + cx)
             * scale, GetY()
             + ((MathUtils.Sin(angle) * innerRadius) + cy)
             * scale);
     path.Close();
     g.Draw(path);
 }
Beispiel #3
0
 public override void Step(GLEx g, float x, float y, float progress,
         int index, int frame_0, LColor color_1, float alpha_2)
 {
     float cx = this.padding + 50, cy = this.padding + 50, angle = (MathUtils.PI / 180)
             * (progress * 360);
     alpha_2 = MathUtils.Max(0.5f, alpha_2);
     g.SetAlpha(alpha_2);
     if (path == null)
     {
         path = new Path(GetX() + x * scale, GetY() + y * scale);
     }
     else
     {
         path.Clear();
         path.Set(GetX() + x * scale, GetY() + y * scale);
     }
     path.LineTo(GetX() + ((MathUtils.Cos(angle) * 35) + cx)
             * scale, GetY()
             + ((MathUtils.Sin(angle) * 35) + cy) * scale);
     path.Close();
     g.Draw(path);
     if (path == null)
     {
         path = new Path(GetX()
                 + ((MathUtils.Cos(-angle) * 32) + cx) * scale,
                 GetY() + ((MathUtils.Sin(-angle) * 32) + cy)
                         * scale);
     }
     else
     {
         path.Clear();
         path.Set(GetX() + ((MathUtils.Cos(-angle) * 32) + cx)
                 * scale, GetY()
                 + ((MathUtils.Sin(-angle) * 32) + cy) * scale);
     }
     path.LineTo(GetX() + ((MathUtils.Cos(-angle) * 27) + cx)
             * scale, GetY()
             + ((MathUtils.Sin(-angle) * 27) + cy) * scale);
     path.Close();
     g.Draw(path);
     g.SetAlpha(1);
 }