Пример #1
0
		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();
			}
		}
Пример #2
0
            public override void Step(GLEx g, float x, float y, float progress,
					int index, int frame, LColor color, float alpha) {
	
				float cx = this.padding + 50, cy = this.padding + 50, angle = (MathUtils.PI / 180)
						* (progress * 360);
				alpha = MathUtils.Max(0.5f, alpha);
				g.SetAlpha(alpha);
				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);
			}
Пример #3
0
			public override void Step(GLEx g, float x, float y, float progress,
					int index, int frame, LColor color, float alpha) {
				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);
			}