You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-30 18:30:54 +00:00
Round ProgressBar percentage instead of truncating
Updated to round before converting ratio to int, to make percentage display more accurate
This commit is contained in:
@@ -165,7 +165,7 @@ void ProgressBar::_notification(int p_what) {
|
||||
ratio = CLAMP(percentage, is_lesser_allowed() ? percentage : 0, is_greater_allowed() ? percentage : 1);
|
||||
}
|
||||
|
||||
String txt = itos(int(ratio * 100));
|
||||
String txt = itos(int(Math::round(ratio * 100)));
|
||||
|
||||
if (is_localizing_numeral_system()) {
|
||||
const String &lang = _get_locale();
|
||||
|
||||
Reference in New Issue
Block a user