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); }
public override void CreateUI(GLEx g, int x, int y, LComponent component, LTexture[] buttonImage) { if (visible && goalPath != null) { g.SetLineWidth(lineWidth); g.SetColor(color); g.Draw(goalPath); g.ResetLineWidth(); g.ResetColor(); } }
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); }