diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-01-13 14:08:30 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-01-13 14:08:30 -0300 |
commit | de8cc309d66641d52a6832ad65f26ce73378fb88 (patch) | |
tree | 0ae019462739e97ba4ae562ba527696fe8c2f253 /scene/gui/progress_bar.cpp | |
parent | e53c247cb16b25b828461f32533da64f4fab0e0b (diff) | |
download | redot-engine-de8cc309d66641d52a6832ad65f26ce73378fb88.tar.gz |
Renamed button functions to be more verboes, same with Range unit value -> ratio
Diffstat (limited to 'scene/gui/progress_bar.cpp')
-rw-r--r-- | scene/gui/progress_bar.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/progress_bar.cpp b/scene/gui/progress_bar.cpp index ee9369fb3a..0f99d4f19e 100644 --- a/scene/gui/progress_bar.cpp +++ b/scene/gui/progress_bar.cpp @@ -53,7 +53,7 @@ void ProgressBar::_notification(int p_what) { Color font_color=get_color("font_color"); draw_style_box(bg,Rect2(Point2(),get_size())); - float r = get_unit_value(); + float r = get_as_ratio(); int mp = fg->get_minimum_size().width; int p = r*get_size().width-mp; if (p>0) { @@ -62,7 +62,7 @@ void ProgressBar::_notification(int p_what) { } if (percent_visible) { - String txt=itos(int(get_unit_value()*100))+"%"; + String txt=itos(int(get_as_ratio()*100))+"%"; font->draw_halign(get_canvas_item(),Point2(0,font->get_ascent()+(get_size().height-font->get_height())/2),HALIGN_CENTER,get_size().width,txt,font_color); } } |