diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-11-18 19:14:37 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-11-18 19:14:37 -0300 |
commit | 762a76630c15bfa45905a94e94616f6db310632b (patch) | |
tree | 253ab5c68bc5709c3e4fe0efd4e3c47df2656be6 | |
parent | a8f18e1bae63edcca6342b8e507585be6ba56d20 (diff) | |
parent | bf4bb3e17b731f1c726fef5e85fd9ea93b2acc3a (diff) |
Merge pull request #2638 from MarianoGnu/master
add missing default value
-rw-r--r-- | scene/gui/texture_progress.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/scene/gui/texture_progress.cpp b/scene/gui/texture_progress.cpp index 0d549108fa..c8930add6e 100644 --- a/scene/gui/texture_progress.cpp +++ b/scene/gui/texture_progress.cpp @@ -233,11 +233,7 @@ float TextureProgress::get_radial_initial_angle() void TextureProgress::set_fill_degrees(float p_angle) { - while(p_angle>360) - p_angle-=360; - while (p_angle<0) - p_angle+=360; - rad_max_degrees=p_angle; + rad_max_degrees=CLAMP(p_angle,0,360); update(); } @@ -302,4 +298,5 @@ TextureProgress::TextureProgress() { mode=FILL_LEFT_TO_RIGHT; rad_center_off=Point2(); + rad_max_degrees=360; } |