mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Merge pull request #113531 from aaronp64/progress_bar_round
Round `ProgressBar` percentage instead of truncating
This commit is contained in:
commit
db077a4fec
1 changed files with 1 additions and 1 deletions
|
|
@ -165,7 +165,7 @@ void ProgressBar::_notification(int p_what) {
|
||||||
ratio = CLAMP(percentage, is_lesser_allowed() ? percentage : 0, is_greater_allowed() ? percentage : 1);
|
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()) {
|
if (is_localizing_numeral_system()) {
|
||||||
const String &lang = _get_locale();
|
const String &lang = _get_locale();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue