@rbxts/uiblox 0.1.18 → 0.1.19
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.
|
@@ -3,8 +3,8 @@ export interface PreloaderAssets {
|
|
|
3
3
|
[key: string]: string | PreloaderAssets;
|
|
4
4
|
}
|
|
5
5
|
export interface PreloaderProps {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
preloaderAssets: Map<string, PreloaderAssets>;
|
|
7
|
+
icon?: string;
|
|
8
8
|
showPercentage?: boolean;
|
|
9
9
|
loaderPrecision?: number;
|
|
10
10
|
showAssetName?: boolean;
|
|
@@ -12,7 +12,7 @@ local ProgressBar = TS.import(script, script.Parent.Parent.Parent, "progressBar"
|
|
|
12
12
|
local usePreloaderStyles = TS.import(script, script.Parent, "Preloader.styles").default
|
|
13
13
|
local function Preloader(props)
|
|
14
14
|
local _binding = props
|
|
15
|
-
local
|
|
15
|
+
local preloaderAssets = _binding.preloaderAssets
|
|
16
16
|
local showPercentage = _binding.showPercentage
|
|
17
17
|
if showPercentage == nil then
|
|
18
18
|
showPercentage = false
|
|
@@ -55,8 +55,8 @@ local function Preloader(props)
|
|
|
55
55
|
local _callback = function(assets, category)
|
|
56
56
|
scan(assets, `{category}`)
|
|
57
57
|
end
|
|
58
|
-
for _k, _v in
|
|
59
|
-
_callback(_v, _k,
|
|
58
|
+
for _k, _v in preloaderAssets do
|
|
59
|
+
_callback(_v, _k, preloaderAssets)
|
|
60
60
|
end
|
|
61
61
|
-- ▲ ReadonlyMap.forEach ▲
|
|
62
62
|
return { contentIds, contentNamesById }
|
|
@@ -4,11 +4,6 @@ local _theme = TS.import(script, script.Parent.Parent.Parent.Parent.Parent, "the
|
|
|
4
4
|
local createStyles = _theme.createStyles
|
|
5
5
|
local makeStyles = _theme.makeStyles
|
|
6
6
|
local usePreloaderStyles = makeStyles(function(theme, props)
|
|
7
|
-
local getLogoSrc = function(props)
|
|
8
|
-
local _binding = props
|
|
9
|
-
local logoSrc = _binding.logoSrc
|
|
10
|
-
return logoSrc
|
|
11
|
-
end
|
|
12
7
|
return createStyles({
|
|
13
8
|
container = {
|
|
14
9
|
Size = UDim2.new(1, 0, 1, 0),
|
|
@@ -22,7 +17,7 @@ local usePreloaderStyles = makeStyles(function(theme, props)
|
|
|
22
17
|
AnchorPoint = Vector2.new(0.5, 0.5),
|
|
23
18
|
BackgroundTransparency = 1,
|
|
24
19
|
BorderSizePixel = 0,
|
|
25
|
-
Image =
|
|
20
|
+
Image = props.icon,
|
|
26
21
|
ScaleType = Enum.ScaleType.Fit,
|
|
27
22
|
ZIndex = 110000,
|
|
28
23
|
},
|