Skip to content

Commit

Permalink
improve doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Geokureli committed Sep 30, 2024
1 parent 2edf589 commit e72622a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions flixel/addons/display/FlxRadialGauge.hx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import flixel.util.FlxColor;
#if !flash
/**
* A dynamic shape that fills up radially (like a pie chart). Useful for timers and other things.
* `FlxRadialGauge` uses a shader to fill the bar portion, where `FlxPieDial` creates an animation.
* This also works with any graphic, unlike `FlxPieDial`
* `FlxRadialGauge` uses `FlxRadialWipeShader` to fill the gauge portion, where `FlxPieDial`
* creates an animation. This also works with any graphic, unlike `FlxPieDial`
* @since 5.9.0
*/
class FlxRadialGauge extends FlxSprite
Expand Down Expand Up @@ -72,6 +72,9 @@ class FlxRadialGauge extends FlxSprite

typedef FlxRadialGaugeShape = FlxPieDialShape;

/**
* A shader that masks a static sprite radially, based on the `start` and `end` angles
*/
class FlxRadialWipeShader extends flixel.system.FlxAssets.FlxShader
{
/** The current fill amount, where `0.0` is empty and `1.0` is full */
Expand All @@ -83,7 +86,7 @@ class FlxRadialWipeShader extends flixel.system.FlxAssets.FlxShader
return value;
}

/** the angle in degrees to start the dial fill */
/** The angle in degrees to start the dial fill */
public var start(get, set):Float;
inline function get_start():Float return _start.value[0];
inline function set_start(value:Float):Float
Expand All @@ -92,7 +95,7 @@ class FlxRadialWipeShader extends flixel.system.FlxAssets.FlxShader
return value;
}

/** the angle in degrees to end the dial fill */
/** The angle in degrees to end the dial fill */
public var end(get, set):Float;
inline function get_end():Float return _end.value[0];
inline function set_end(value:Float):Float
Expand Down

0 comments on commit e72622a

Please sign in to comment.