@rbxts/uiblox 0.1.21 → 0.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -77,7 +77,7 @@ local function Preloader(props)
|
|
|
77
77
|
local _assetId = assetId
|
|
78
78
|
setCurrentAsset(contentNamesById[_assetId])
|
|
79
79
|
setPercentage(function(prev)
|
|
80
|
-
local newPercentage = math.
|
|
80
|
+
local newPercentage = math.clamp(prev + unit, 0, 100)
|
|
81
81
|
if newPercentage == 100 then
|
|
82
82
|
setLoaded(true)
|
|
83
83
|
end
|
|
@@ -90,7 +90,7 @@ local function Preloader(props)
|
|
|
90
90
|
if not showPercentage then
|
|
91
91
|
return nil
|
|
92
92
|
end
|
|
93
|
-
return `{string.format(`%.{loaderPrecision}f`, percentage)}%`
|
|
93
|
+
return `{string.format(`%.{loaderPrecision}f`, math.round(percentage))}%`
|
|
94
94
|
end, { showPercentage, loaderPrecision, percentage })
|
|
95
95
|
local _result
|
|
96
96
|
if loaded then
|