@quenty/blend 12.18.4-canary.559.9f38947.0 → 12.19.0-canary.0a5db80.0
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.
- package/CHANGELOG.md +1 -9
- package/package.json +17 -17
- package/src/Shared/Blend/Blend.lua +3 -3
- package/src/Shared/Blend/BlendDefaultProps.lua +19 -19
- package/src/Shared/Blend/SpringObject.lua +5 -4
- package/src/Shared/Test/BlendChildren.story.lua +60 -68
- package/src/Shared/Test/BlendComputePairs.story.lua +15 -16
- package/src/Shared/Test/BlendFind.story.lua +18 -22
- package/src/Shared/Test/BlendPromise.story.lua +53 -57
- package/src/Shared/Test/BlendSingle.story.lua +9 -9
- package/src/Shared/Test/BlendSpring.story.lua +18 -22
- package/src/Shared/Test/BlendTextbox.story.lua +21 -26
- package/test/scripts/Client/ClientMain.client.lua +8 -8
- package/test/scripts/Server/ServerMain.server.lua +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,15 +3,7 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @quenty/blend
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## [12.18.3](https://github.com/Quenty/NevermoreEngine/compare/@quenty/blend@12.18.2...@quenty/blend@12.18.3) (2025-04-10)
|
|
6
|
+
# [12.19.0-canary.0a5db80.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/blend@12.18.2...@quenty/blend@12.19.0-canary.0a5db80.0) (2025-05-10)
|
|
15
7
|
|
|
16
8
|
**Note:** Version bump only for package @quenty/blend
|
|
17
9
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/blend",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.19.0-canary.0a5db80.0",
|
|
4
4
|
"description": "Declarative UI system.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -27,24 +27,24 @@
|
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@quenty/acceltween": "2.
|
|
31
|
-
"@quenty/brio": "14.
|
|
32
|
-
"@quenty/ducktype": "5.
|
|
33
|
-
"@quenty/instanceutils": "13.
|
|
34
|
-
"@quenty/loader": "10.
|
|
35
|
-
"@quenty/maid": "3.
|
|
36
|
-
"@quenty/promise": "10.
|
|
37
|
-
"@quenty/rx": "13.
|
|
38
|
-
"@quenty/signal": "7.
|
|
39
|
-
"@quenty/spring": "10.
|
|
40
|
-
"@quenty/steputils": "3.5.
|
|
30
|
+
"@quenty/acceltween": "2.6.0-canary.0a5db80.0",
|
|
31
|
+
"@quenty/brio": "14.18.0-canary.0a5db80.0",
|
|
32
|
+
"@quenty/ducktype": "5.9.0-canary.0a5db80.0",
|
|
33
|
+
"@quenty/instanceutils": "13.18.0-canary.0a5db80.0",
|
|
34
|
+
"@quenty/loader": "10.9.0-canary.0a5db80.0",
|
|
35
|
+
"@quenty/maid": "3.5.0-canary.0a5db80.0",
|
|
36
|
+
"@quenty/promise": "10.11.0-canary.0a5db80.0",
|
|
37
|
+
"@quenty/rx": "13.18.0-canary.0a5db80.0",
|
|
38
|
+
"@quenty/signal": "7.11.0-canary.0a5db80.0",
|
|
39
|
+
"@quenty/spring": "10.9.0-canary.0a5db80.0",
|
|
40
|
+
"@quenty/steputils": "3.5.5",
|
|
41
41
|
"@quenty/string": "3.3.3",
|
|
42
|
-
"@quenty/valuebaseutils": "13.
|
|
43
|
-
"@quenty/valueobject": "13.
|
|
42
|
+
"@quenty/valuebaseutils": "13.18.0-canary.0a5db80.0",
|
|
43
|
+
"@quenty/valueobject": "13.18.0-canary.0a5db80.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@quenty/contentproviderutils": "12.
|
|
47
|
-
"@quenty/playerthumbnailutils": "10.
|
|
46
|
+
"@quenty/contentproviderutils": "12.18.0-canary.0a5db80.0",
|
|
47
|
+
"@quenty/playerthumbnailutils": "10.11.0-canary.0a5db80.0"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "0a5db8004684dc3e76fd5944599a22602d48cfa9"
|
|
50
50
|
}
|
|
@@ -8,19 +8,19 @@ local require = require(script.Parent.loader).load(script)
|
|
|
8
8
|
local AccelTween = require("AccelTween")
|
|
9
9
|
local BlendDefaultProps = require("BlendDefaultProps")
|
|
10
10
|
local Brio = require("Brio")
|
|
11
|
-
local BrioUtils = require("BrioUtils")
|
|
12
11
|
local Maid = require("Maid")
|
|
13
12
|
local MaidTaskUtils = require("MaidTaskUtils")
|
|
14
13
|
local Observable = require("Observable")
|
|
15
14
|
local Promise = require("Promise")
|
|
16
15
|
local Rx = require("Rx")
|
|
17
|
-
local
|
|
16
|
+
local BrioUtils = require("BrioUtils")
|
|
18
17
|
local RxInstanceUtils = require("RxInstanceUtils")
|
|
19
18
|
local RxValueBaseUtils = require("RxValueBaseUtils")
|
|
20
19
|
local Signal = require("Signal")
|
|
21
20
|
local StepUtils = require("StepUtils")
|
|
22
21
|
local ValueBaseUtils = require("ValueBaseUtils")
|
|
23
22
|
local ValueObject = require("ValueObject")
|
|
23
|
+
local RxBrioUtils = require("RxBrioUtils")
|
|
24
24
|
local SpringObject
|
|
25
25
|
|
|
26
26
|
local Blend = {}
|
|
@@ -1173,4 +1173,4 @@ function Blend.mount(instance: Instance, props: BlendProps): Maid.Maid
|
|
|
1173
1173
|
return maid
|
|
1174
1174
|
end
|
|
1175
1175
|
|
|
1176
|
-
return Blend
|
|
1176
|
+
return Blend
|
|
@@ -33,12 +33,12 @@ SOFTWARE.
|
|
|
33
33
|
return {
|
|
34
34
|
ScreenGui = {
|
|
35
35
|
ResetOnSpawn = false,
|
|
36
|
-
ZIndexBehavior = Enum.ZIndexBehavior.Sibling
|
|
36
|
+
ZIndexBehavior = Enum.ZIndexBehavior.Sibling
|
|
37
37
|
},
|
|
38
38
|
|
|
39
39
|
BillboardGui = {
|
|
40
40
|
ResetOnSpawn = false,
|
|
41
|
-
ZIndexBehavior = Enum.ZIndexBehavior.Sibling
|
|
41
|
+
ZIndexBehavior = Enum.ZIndexBehavior.Sibling
|
|
42
42
|
},
|
|
43
43
|
|
|
44
44
|
SurfaceGui = {
|
|
@@ -46,13 +46,13 @@ return {
|
|
|
46
46
|
ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
|
|
47
47
|
|
|
48
48
|
SizingMode = Enum.SurfaceGuiSizingMode.PixelsPerStud,
|
|
49
|
-
PixelsPerStud = 50
|
|
49
|
+
PixelsPerStud = 50
|
|
50
50
|
},
|
|
51
51
|
|
|
52
52
|
Frame = {
|
|
53
53
|
BackgroundColor3 = Color3.new(1, 1, 1),
|
|
54
54
|
BorderColor3 = Color3.new(0, 0, 0),
|
|
55
|
-
BorderSizePixel = 0
|
|
55
|
+
BorderSizePixel = 0
|
|
56
56
|
},
|
|
57
57
|
|
|
58
58
|
ScrollingFrame = {
|
|
@@ -60,7 +60,7 @@ return {
|
|
|
60
60
|
BorderColor3 = Color3.new(0, 0, 0),
|
|
61
61
|
BorderSizePixel = 0,
|
|
62
62
|
|
|
63
|
-
ScrollBarImageColor3 = Color3.new(0, 0, 0)
|
|
63
|
+
ScrollBarImageColor3 = Color3.new(0, 0, 0)
|
|
64
64
|
},
|
|
65
65
|
|
|
66
66
|
TextLabel = {
|
|
@@ -71,7 +71,7 @@ return {
|
|
|
71
71
|
Font = Enum.Font.SourceSans,
|
|
72
72
|
Text = "",
|
|
73
73
|
TextColor3 = Color3.new(0, 0, 0),
|
|
74
|
-
TextSize = 14
|
|
74
|
+
TextSize = 14
|
|
75
75
|
},
|
|
76
76
|
|
|
77
77
|
TextButton = {
|
|
@@ -84,7 +84,7 @@ return {
|
|
|
84
84
|
Font = Enum.Font.SourceSans,
|
|
85
85
|
Text = "",
|
|
86
86
|
TextColor3 = Color3.new(0, 0, 0),
|
|
87
|
-
TextSize = 14
|
|
87
|
+
TextSize = 14
|
|
88
88
|
},
|
|
89
89
|
|
|
90
90
|
TextBox = {
|
|
@@ -97,13 +97,13 @@ return {
|
|
|
97
97
|
Font = Enum.Font.SourceSans,
|
|
98
98
|
Text = "",
|
|
99
99
|
TextColor3 = Color3.new(0, 0, 0),
|
|
100
|
-
TextSize = 14
|
|
100
|
+
TextSize = 14
|
|
101
101
|
},
|
|
102
102
|
|
|
103
103
|
ImageLabel = {
|
|
104
104
|
BackgroundColor3 = Color3.new(1, 1, 1),
|
|
105
105
|
BorderColor3 = Color3.new(0, 0, 0),
|
|
106
|
-
BorderSizePixel = 0
|
|
106
|
+
BorderSizePixel = 0
|
|
107
107
|
},
|
|
108
108
|
|
|
109
109
|
ImageButton = {
|
|
@@ -111,31 +111,31 @@ return {
|
|
|
111
111
|
BorderColor3 = Color3.new(0, 0, 0),
|
|
112
112
|
BorderSizePixel = 0,
|
|
113
113
|
|
|
114
|
-
AutoButtonColor = false
|
|
114
|
+
AutoButtonColor = false
|
|
115
115
|
},
|
|
116
116
|
|
|
117
117
|
ViewportFrame = {
|
|
118
118
|
BackgroundColor3 = Color3.new(1, 1, 1),
|
|
119
119
|
BorderColor3 = Color3.new(0, 0, 0),
|
|
120
|
-
BorderSizePixel = 0
|
|
120
|
+
BorderSizePixel = 0
|
|
121
121
|
},
|
|
122
122
|
|
|
123
123
|
VideoFrame = {
|
|
124
124
|
BackgroundColor3 = Color3.new(1, 1, 1),
|
|
125
125
|
BorderColor3 = Color3.new(0, 0, 0),
|
|
126
|
-
BorderSizePixel = 0
|
|
126
|
+
BorderSizePixel = 0
|
|
127
127
|
},
|
|
128
128
|
|
|
129
129
|
UIListLayout = {
|
|
130
|
-
SortOrder = Enum.SortOrder.LayoutOrder
|
|
130
|
+
SortOrder = Enum.SortOrder.LayoutOrder;
|
|
131
131
|
},
|
|
132
132
|
|
|
133
133
|
Sound = {
|
|
134
|
-
RollOffMode = Enum.RollOffMode.InverseTapered
|
|
135
|
-
}
|
|
134
|
+
RollOffMode = Enum.RollOffMode.InverseTapered;
|
|
135
|
+
};
|
|
136
136
|
|
|
137
137
|
Part = {
|
|
138
|
-
TopSurface = Enum.SurfaceType.Smooth
|
|
139
|
-
BottomSurface = Enum.SurfaceType.Smooth
|
|
140
|
-
}
|
|
141
|
-
}
|
|
138
|
+
TopSurface = Enum.SurfaceType.Smooth;
|
|
139
|
+
BottomSurface = Enum.SurfaceType.Smooth;
|
|
140
|
+
};
|
|
141
|
+
}
|
|
@@ -603,6 +603,7 @@ function SpringObject:_getSpringForType(converted)
|
|
|
603
603
|
local currentSpring = rawget(self, "_currentSpring")
|
|
604
604
|
|
|
605
605
|
if currentSpring == nil then
|
|
606
|
+
|
|
606
607
|
-- only happens on init
|
|
607
608
|
local newSpring = Spring.new(converted)
|
|
608
609
|
|
|
@@ -648,9 +649,9 @@ function SpringObject:_getInitInfo()
|
|
|
648
649
|
end
|
|
649
650
|
|
|
650
651
|
local value = {
|
|
651
|
-
Clock = os.clock
|
|
652
|
-
Damper = 1
|
|
653
|
-
Speed = 1
|
|
652
|
+
Clock = os.clock;
|
|
653
|
+
Damper = 1;
|
|
654
|
+
Speed = 1;
|
|
654
655
|
}
|
|
655
656
|
|
|
656
657
|
rawset(self, "_initInfo", value)
|
|
@@ -666,4 +667,4 @@ function SpringObject:Destroy()
|
|
|
666
667
|
setmetatable(self, nil)
|
|
667
668
|
end
|
|
668
669
|
|
|
669
|
-
return SpringObject
|
|
670
|
+
return SpringObject
|
|
@@ -2,15 +2,14 @@
|
|
|
2
2
|
@class Blend.story
|
|
3
3
|
]]
|
|
4
4
|
|
|
5
|
-
local require =
|
|
6
|
-
require(game:GetService("ServerScriptService"):FindFirstChild("LoaderUtils", true).Parent).bootstrapStory(script)
|
|
5
|
+
local require = require(game:GetService("ServerScriptService"):FindFirstChild("LoaderUtils", true).Parent).bootstrapStory(script)
|
|
7
6
|
|
|
8
7
|
local RunService = game:GetService("RunService")
|
|
9
8
|
|
|
10
9
|
local Blend = require("Blend")
|
|
11
10
|
local Maid = require("Maid")
|
|
12
|
-
local Rx = require("Rx")
|
|
13
11
|
local ValueObject = require("ValueObject")
|
|
12
|
+
local Rx = require("Rx")
|
|
14
13
|
|
|
15
14
|
return function(target)
|
|
16
15
|
local maid = Maid.new()
|
|
@@ -21,54 +20,54 @@ return function(target)
|
|
|
21
20
|
|
|
22
21
|
local uiCornerValueObject = ValueObject.new()
|
|
23
22
|
uiCornerValueObject.Value = Blend.New "UICorner" {
|
|
24
|
-
CornerRadius = UDim.new(0, 5)
|
|
25
|
-
}
|
|
23
|
+
CornerRadius = UDim.new(0, 5);
|
|
24
|
+
};
|
|
26
25
|
maid:GiveTask(uiCornerValueObject)
|
|
27
26
|
|
|
28
27
|
-- Reassign to a new value
|
|
29
28
|
maid:GiveTask(task.delay(1, function()
|
|
30
29
|
uiCornerValueObject.Value = Blend.New "UICorner" {
|
|
31
|
-
CornerRadius = UDim.new(0, 5)
|
|
32
|
-
}
|
|
30
|
+
CornerRadius = UDim.new(0, 5);
|
|
31
|
+
};
|
|
33
32
|
end))
|
|
34
33
|
|
|
35
34
|
local transparency = Blend.Computed(percentVisible, function(visible)
|
|
36
35
|
return 1 - visible
|
|
37
|
-
end)
|
|
36
|
+
end);
|
|
38
37
|
|
|
39
38
|
-- Try a kitchen sink of items
|
|
40
39
|
maid:GiveTask((Blend.New "TextLabel" {
|
|
41
|
-
Parent = target
|
|
42
|
-
Font = Enum.Font.FredokaOne
|
|
40
|
+
Parent = target;
|
|
41
|
+
Font = Enum.Font.FredokaOne;
|
|
43
42
|
Size = Blend.Computed(percentVisible, function(visible)
|
|
44
|
-
return UDim2.new(0, visible
|
|
45
|
-
end)
|
|
46
|
-
TextTransparency = transparency
|
|
47
|
-
BackgroundTransparency = transparency
|
|
48
|
-
Position = UDim2.new(0.5, 0, 0.5, 0)
|
|
49
|
-
AnchorPoint = Vector2.new(0.5, 0.5)
|
|
50
|
-
Text = state
|
|
51
|
-
TextSize = 15
|
|
52
|
-
TextScaled = false
|
|
43
|
+
return UDim2.new(0, visible*100 + 50, 0, 50);
|
|
44
|
+
end);
|
|
45
|
+
TextTransparency = transparency;
|
|
46
|
+
BackgroundTransparency = transparency;
|
|
47
|
+
Position = UDim2.new(0.5, 0, 0.5, 0);
|
|
48
|
+
AnchorPoint = Vector2.new(0.5, 0.5);
|
|
49
|
+
Text = state;
|
|
50
|
+
TextSize = 15;
|
|
51
|
+
TextScaled = false;
|
|
53
52
|
|
|
54
53
|
[Blend.Children] = {
|
|
55
54
|
Blend.New "UIPadding" {
|
|
56
|
-
PaddingLeft = UDim.new(0, 10)
|
|
57
|
-
PaddingRight = UDim.new(0, 10)
|
|
58
|
-
PaddingTop = UDim.new(0, 10)
|
|
59
|
-
PaddingBottom = UDim.new(0, 10)
|
|
60
|
-
}
|
|
55
|
+
PaddingLeft = UDim.new(0, 10);
|
|
56
|
+
PaddingRight = UDim.new(0, 10);
|
|
57
|
+
PaddingTop = UDim.new(0, 10);
|
|
58
|
+
PaddingBottom = UDim.new(0, 10);
|
|
59
|
+
};
|
|
61
60
|
|
|
62
61
|
Blend.New "UIScale" {
|
|
63
62
|
Scale = Blend.Computed(percentVisible, function(visible)
|
|
64
|
-
return 0.8 + 0.2
|
|
65
|
-
end)
|
|
66
|
-
}
|
|
63
|
+
return 0.8 + 0.2*visible;
|
|
64
|
+
end);
|
|
65
|
+
};
|
|
67
66
|
|
|
68
|
-
uiCornerValueObject
|
|
67
|
+
uiCornerValueObject;
|
|
69
68
|
|
|
70
|
-
Rx.NEVER
|
|
71
|
-
Rx.EMPTY
|
|
69
|
+
Rx.NEVER;
|
|
70
|
+
Rx.EMPTY;
|
|
72
71
|
|
|
73
72
|
{
|
|
74
73
|
Blend.Single(Blend.Computed(percentVisible, function(visible)
|
|
@@ -76,63 +75,56 @@ return function(target)
|
|
|
76
75
|
return nil
|
|
77
76
|
else
|
|
78
77
|
return Blend.New "Frame" {
|
|
79
|
-
Size = UDim2.new(0, 150, 0, 30)
|
|
80
|
-
AnchorPoint = Vector2.new(0.5, 0)
|
|
81
|
-
Position = UDim2.new(0.5, 0, 1, 10)
|
|
82
|
-
BackgroundTransparency = transparency
|
|
78
|
+
Size = UDim2.new(0, 150, 0, 30);
|
|
79
|
+
AnchorPoint = Vector2.new(0.5, 0);
|
|
80
|
+
Position = UDim2.new(0.5, 0, 1, 10);
|
|
81
|
+
BackgroundTransparency = transparency;
|
|
83
82
|
|
|
84
83
|
Blend.New "UICorner" {
|
|
85
|
-
CornerRadius = UDim.new(0, 10)
|
|
86
|
-
}
|
|
87
|
-
}
|
|
84
|
+
CornerRadius = UDim.new(0, 10);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
88
87
|
end
|
|
89
|
-
end))
|
|
90
|
-
|
|
88
|
+
end));
|
|
89
|
+
|
|
90
|
+
};
|
|
91
91
|
|
|
92
92
|
{
|
|
93
93
|
Blend.Single(Blend.Computed(percentVisible, function(visible)
|
|
94
94
|
local results = {}
|
|
95
95
|
|
|
96
96
|
-- constructs a ton of children everytime this changes
|
|
97
|
-
for x
|
|
98
|
-
table.insert(
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
},
|
|
113
|
-
}
|
|
114
|
-
)
|
|
97
|
+
for x=0, visible*100, 20 do
|
|
98
|
+
table.insert(results, Blend.New "Frame" {
|
|
99
|
+
Size = UDim2.new(0, 8, 0, 8);
|
|
100
|
+
Position = UDim2.new(x/100, 0, 0.9, 0);
|
|
101
|
+
AnchorPoint = Vector2.new(0.5, 0.5);
|
|
102
|
+
BorderSizePixel = 0;
|
|
103
|
+
BackgroundColor3 = Color3.new(x/100, 0.5, 0.5);
|
|
104
|
+
BackgroundTransparency = transparency;
|
|
105
|
+
|
|
106
|
+
[Blend.Children] = {
|
|
107
|
+
Blend.New "UICorner" {
|
|
108
|
+
CornerRadius = UDim.new(0, 10);
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
})
|
|
115
112
|
end
|
|
116
113
|
|
|
117
114
|
return results
|
|
118
|
-
end))
|
|
119
|
-
}
|
|
120
|
-
}
|
|
115
|
+
end));
|
|
116
|
+
};
|
|
117
|
+
};
|
|
121
118
|
}):Subscribe())
|
|
122
119
|
|
|
123
120
|
local PERIOD = 5
|
|
124
121
|
maid:GiveTask(RunService.RenderStepped:Connect(function()
|
|
125
122
|
local timeElapsed = os.clock()
|
|
126
|
-
state.Value = string.format(
|
|
127
|
-
|
|
128
|
-
math.floor(timeElapsed / 60) % 60,
|
|
129
|
-
math.floor(timeElapsed % 60),
|
|
130
|
-
math.floor(timeElapsed * 1000) % 1000
|
|
131
|
-
)
|
|
132
|
-
percentVisible.Value = math.clamp((math.sin(os.clock() * math.pi * 2 / PERIOD) + 1), 0, 1)
|
|
123
|
+
state.Value = string.format("%02d:%02d:%0.3d", math.floor(timeElapsed / 60) % 60, math.floor(timeElapsed % 60), math.floor(timeElapsed*1000) % 1000)
|
|
124
|
+
percentVisible.Value = math.clamp((math.sin(os.clock()*math.pi*2/PERIOD) + 1), 0, 1)
|
|
133
125
|
end))
|
|
134
126
|
|
|
135
127
|
return function()
|
|
136
128
|
maid:DoCleaning()
|
|
137
129
|
end
|
|
138
|
-
end
|
|
130
|
+
end
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
@class Blend.story
|
|
3
3
|
]]
|
|
4
4
|
|
|
5
|
-
local require =
|
|
6
|
-
require(game:GetService("ServerScriptService"):FindFirstChild("LoaderUtils", true).Parent).bootstrapStory(script)
|
|
5
|
+
local require = require(game:GetService("ServerScriptService"):FindFirstChild("LoaderUtils", true).Parent).bootstrapStory(script)
|
|
7
6
|
|
|
8
7
|
local Blend = require("Blend")
|
|
9
8
|
local Maid = require("Maid")
|
|
@@ -11,17 +10,17 @@ local Maid = require("Maid")
|
|
|
11
10
|
return function(target)
|
|
12
11
|
local maid = Maid.new()
|
|
13
12
|
|
|
14
|
-
local state = Blend.State({
|
|
13
|
+
local state = Blend.State({"a", "b", "c"})
|
|
15
14
|
maid:GiveTask(state)
|
|
16
15
|
|
|
17
16
|
maid:GiveTask((Blend.New "TextLabel" {
|
|
18
|
-
Parent = target
|
|
17
|
+
Parent = target;
|
|
19
18
|
|
|
20
19
|
[Blend.Children] = {
|
|
21
20
|
Blend.New "TextButton" {
|
|
22
|
-
Text = "Add"
|
|
23
|
-
AutoButtonColor = true
|
|
24
|
-
Size = UDim2.new(0, 100, 0, 20)
|
|
21
|
+
Text = "Add";
|
|
22
|
+
AutoButtonColor = true;
|
|
23
|
+
Size = UDim2.new(0, 100, 0, 20);
|
|
25
24
|
[Blend.OnEvent "Activated"] = function()
|
|
26
25
|
local newState = {}
|
|
27
26
|
for _, item in state.Value do
|
|
@@ -29,23 +28,23 @@ return function(target)
|
|
|
29
28
|
end
|
|
30
29
|
table.insert(newState, string.char(string.byte("a") + #newState))
|
|
31
30
|
state.Value = newState
|
|
32
|
-
end
|
|
33
|
-
}
|
|
31
|
+
end;
|
|
32
|
+
};
|
|
34
33
|
Blend.ComputedPairs(state, function(_index, value)
|
|
35
34
|
print("Compute", value)
|
|
36
35
|
return Blend.New "TextLabel" {
|
|
37
|
-
Text = tostring(value)
|
|
38
|
-
Size = UDim2.new(0, 20, 0, 20)
|
|
36
|
+
Text = tostring(value);
|
|
37
|
+
Size = UDim2.new(0, 20, 0, 20);
|
|
39
38
|
}
|
|
40
|
-
end)
|
|
39
|
+
end);
|
|
41
40
|
|
|
42
41
|
Blend.New "UIListLayout" {
|
|
43
|
-
Padding = UDim.new(0, 5)
|
|
44
|
-
}
|
|
45
|
-
}
|
|
42
|
+
Padding = UDim.new(0, 5);
|
|
43
|
+
};
|
|
44
|
+
};
|
|
46
45
|
}):Subscribe())
|
|
47
46
|
|
|
48
47
|
return function()
|
|
49
48
|
maid:DoCleaning()
|
|
50
49
|
end
|
|
51
|
-
end
|
|
50
|
+
end
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
@class Blend.story
|
|
3
3
|
]]
|
|
4
4
|
|
|
5
|
-
local require =
|
|
6
|
-
require(game:GetService("ServerScriptService"):FindFirstChild("LoaderUtils", true).Parent).bootstrapStory(script)
|
|
5
|
+
local require = require(game:GetService("ServerScriptService"):FindFirstChild("LoaderUtils", true).Parent).bootstrapStory(script)
|
|
7
6
|
|
|
8
7
|
local RunService = game:GetService("RunService")
|
|
9
8
|
|
|
@@ -16,12 +15,9 @@ return function(target)
|
|
|
16
15
|
local isVisible = Instance.new("BoolValue")
|
|
17
16
|
isVisible.Value = false
|
|
18
17
|
|
|
19
|
-
local percentVisible = Blend.Spring(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
end),
|
|
23
|
-
35
|
|
24
|
-
)
|
|
18
|
+
local percentVisible = Blend.Spring(Blend.Computed(isVisible, function(visible)
|
|
19
|
+
return visible and 1 or 0
|
|
20
|
+
end), 35)
|
|
25
21
|
|
|
26
22
|
local transparency = Blend.Computed(percentVisible, function(percent)
|
|
27
23
|
return 1 - percent
|
|
@@ -37,7 +33,7 @@ return function(target)
|
|
|
37
33
|
maid:GiveTask(frame)
|
|
38
34
|
|
|
39
35
|
local subFrame = Instance.new("Frame")
|
|
40
|
-
subFrame.Name = "CenterFrame"
|
|
36
|
+
subFrame.Name = "CenterFrame";
|
|
41
37
|
subFrame.Size = UDim2.new(0.5, 0, 0.5, 0)
|
|
42
38
|
subFrame.BackgroundColor3 = Color3.new(0.5, 0.5, 0.5)
|
|
43
39
|
subFrame.AnchorPoint = Vector2.new(0.5, 0.5)
|
|
@@ -50,35 +46,35 @@ return function(target)
|
|
|
50
46
|
uiScale.Parent = subFrame
|
|
51
47
|
|
|
52
48
|
maid:GiveTask(Blend.mount(frame, {
|
|
53
|
-
Size = UDim2.new(0.5, 0, 0.5, 0)
|
|
49
|
+
Size = UDim2.new(0.5, 0, 0.5, 0);
|
|
54
50
|
|
|
55
51
|
Blend.New "UICorner" {
|
|
56
|
-
CornerRadius = UDim.new(0.05, 0)
|
|
57
|
-
}
|
|
52
|
+
CornerRadius = UDim.new(0.05, 0);
|
|
53
|
+
};
|
|
58
54
|
|
|
59
55
|
Blend.Find "Frame" {
|
|
60
|
-
Name = "CenterFrame"
|
|
56
|
+
Name = "CenterFrame";
|
|
61
57
|
|
|
62
58
|
Blend.Find "UIScale" {
|
|
63
|
-
Name = "MyUIScale"
|
|
59
|
+
Name = "MyUIScale";
|
|
64
60
|
|
|
65
61
|
Scale = Blend.Computed(percentVisible, function(percent)
|
|
66
|
-
return 0.8 + 0.2
|
|
67
|
-
end)
|
|
68
|
-
}
|
|
62
|
+
return 0.8 + 0.2*percent
|
|
63
|
+
end);
|
|
64
|
+
};
|
|
69
65
|
|
|
70
66
|
Blend.New "UICorner" {
|
|
71
|
-
CornerRadius = UDim.new(0.05, 0)
|
|
72
|
-
}
|
|
73
|
-
}
|
|
67
|
+
CornerRadius = UDim.new(0.05, 0);
|
|
68
|
+
};
|
|
69
|
+
};
|
|
74
70
|
}))
|
|
75
71
|
|
|
76
72
|
local PERIOD = 2
|
|
77
73
|
maid:GiveTask(RunService.RenderStepped:Connect(function()
|
|
78
|
-
isVisible.Value = os.clock()
|
|
74
|
+
isVisible.Value = os.clock()/PERIOD % 1 < 0.5
|
|
79
75
|
end))
|
|
80
76
|
|
|
81
77
|
return function()
|
|
82
78
|
maid:DoCleaning()
|
|
83
79
|
end
|
|
84
|
-
end
|
|
80
|
+
end
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
@class BlendTextbox.story
|
|
3
3
|
]]
|
|
4
4
|
|
|
5
|
-
local require =
|
|
6
|
-
require(game:GetService("ServerScriptService"):FindFirstChild("LoaderUtils", true).Parent).bootstrapStory(script)
|
|
5
|
+
local require = require(game:GetService("ServerScriptService"):FindFirstChild("LoaderUtils", true).Parent).bootstrapStory(script)
|
|
7
6
|
|
|
8
7
|
local RunService = game:GetService("RunService")
|
|
9
8
|
|
|
@@ -28,84 +27,81 @@ return function(target)
|
|
|
28
27
|
local userName = Blend.Dynamic(userIdState, function(userId)
|
|
29
28
|
return PlayerThumbnailUtils.promiseUserName(userId)
|
|
30
29
|
end)
|
|
31
|
-
local percentVisible = Blend.Spring(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
end),
|
|
35
|
-
35
|
|
36
|
-
)
|
|
30
|
+
local percentVisible = Blend.Spring(Blend.Computed(isVisible, function(visible)
|
|
31
|
+
return visible and 1 or 0
|
|
32
|
+
end), 35)
|
|
37
33
|
local transparency = Blend.Computed(percentVisible, function(percent)
|
|
38
34
|
return 1 - percent
|
|
39
35
|
end)
|
|
40
36
|
|
|
41
37
|
maid:GiveTask((Blend.New "Frame" {
|
|
42
|
-
Parent = target
|
|
43
|
-
Name = "ProfileImage"
|
|
44
|
-
LayoutOrder = 15
|
|
45
|
-
BackgroundTransparency = 1
|
|
46
|
-
Size = UDim2.new(0, 100, 0, 130)
|
|
47
|
-
Position = UDim2.fromScale(0.5, 0.5)
|
|
48
|
-
AnchorPoint = Vector2.new(0.5, 0.5)
|
|
38
|
+
Parent = target;
|
|
39
|
+
Name = "ProfileImage";
|
|
40
|
+
LayoutOrder = 15;
|
|
41
|
+
BackgroundTransparency = 1;
|
|
42
|
+
Size = UDim2.new(0, 100, 0, 130);
|
|
43
|
+
Position = UDim2.fromScale(0.5, 0.5);
|
|
44
|
+
AnchorPoint = Vector2.new(0.5, 0.5);
|
|
49
45
|
[Blend.Children] = {
|
|
50
46
|
Blend.New "UIScale" {
|
|
51
47
|
Scale = Blend.Computed(percentVisible, function(percent)
|
|
52
|
-
return 0.8 + 0.2
|
|
53
|
-
end)
|
|
54
|
-
}
|
|
48
|
+
return 0.8 + 0.2*percent
|
|
49
|
+
end);
|
|
50
|
+
};
|
|
55
51
|
|
|
56
52
|
Blend.New "TextLabel" {
|
|
57
|
-
Size = UDim2.new(1, 0, 0, 30)
|
|
58
|
-
Position = UDim2.new(0.5, 0, 1, 0)
|
|
59
|
-
AnchorPoint = Vector2.new(0.5, 1)
|
|
60
|
-
BackgroundTransparency = 1
|
|
61
|
-
TextTransparency = transparency
|
|
62
|
-
TextColor3 = Color3.new(1, 1, 1)
|
|
63
|
-
TextSize = 20
|
|
64
|
-
Font = Enum.Font.Gotham
|
|
65
|
-
Text = userName
|
|
66
|
-
}
|
|
53
|
+
Size = UDim2.new(1, 0, 0, 30);
|
|
54
|
+
Position = UDim2.new(0.5, 0, 1, 0);
|
|
55
|
+
AnchorPoint = Vector2.new(0.5, 1);
|
|
56
|
+
BackgroundTransparency = 1;
|
|
57
|
+
TextTransparency = transparency;
|
|
58
|
+
TextColor3 = Color3.new(1, 1, 1);
|
|
59
|
+
TextSize = 20;
|
|
60
|
+
Font = Enum.Font.Gotham;
|
|
61
|
+
Text = userName;
|
|
62
|
+
};
|
|
67
63
|
|
|
68
64
|
Blend.New "Frame" {
|
|
69
|
-
Position = UDim2.new(0.5, 0, 0, 0)
|
|
70
|
-
AnchorPoint = Vector2.new(0.5, 0)
|
|
71
|
-
Size = UDim2.new(1, 0, 1, 0)
|
|
72
|
-
BackgroundColor3 = Color3.new(0.2, 0.25, 0.2)
|
|
73
|
-
BackgroundTransparency = transparency
|
|
65
|
+
Position = UDim2.new(0.5, 0, 0, 0);
|
|
66
|
+
AnchorPoint = Vector2.new(0.5, 0);
|
|
67
|
+
Size = UDim2.new(1, 0, 1, 0);
|
|
68
|
+
BackgroundColor3 = Color3.new(0.2, 0.25, 0.2);
|
|
69
|
+
BackgroundTransparency = transparency;
|
|
74
70
|
[Blend.Children] = {
|
|
75
71
|
Blend.New "UIAspectRatioConstraint" {
|
|
76
|
-
AspectRatio = 1
|
|
77
|
-
}
|
|
72
|
+
AspectRatio = 1;
|
|
73
|
+
};
|
|
78
74
|
Blend.New "UICorner" {
|
|
79
|
-
CornerRadius = UDim.new(1, 0)
|
|
80
|
-
}
|
|
75
|
+
CornerRadius = UDim.new(1, 0);
|
|
76
|
+
};
|
|
81
77
|
Blend.New "UIPadding" {
|
|
82
|
-
PaddingLeft = UDim.new(0, 2)
|
|
83
|
-
PaddingRight = UDim.new(0, 2)
|
|
84
|
-
PaddingTop = UDim.new(0, 2)
|
|
85
|
-
PaddingBottom = UDim.new(0, 2)
|
|
86
|
-
}
|
|
78
|
+
PaddingLeft = UDim.new(0, 2);
|
|
79
|
+
PaddingRight = UDim.new(0, 2);
|
|
80
|
+
PaddingTop = UDim.new(0, 2);
|
|
81
|
+
PaddingBottom = UDim.new(0, 2);
|
|
82
|
+
};
|
|
87
83
|
|
|
88
84
|
Blend.New "ImageLabel" {
|
|
89
|
-
Size = UDim2.new(1, 0, 1, 0)
|
|
90
|
-
Image = userImage
|
|
91
|
-
BackgroundTransparency = transparency
|
|
92
|
-
ImageTransparency = transparency
|
|
93
|
-
BackgroundColor3 = Color3.new(0.1, 0.1, 0.1)
|
|
85
|
+
Size = UDim2.new(1, 0, 1, 0);
|
|
86
|
+
Image = userImage;
|
|
87
|
+
BackgroundTransparency = transparency;
|
|
88
|
+
ImageTransparency = transparency;
|
|
89
|
+
BackgroundColor3 = Color3.new(0.1, 0.1, 0.1);
|
|
94
90
|
|
|
95
91
|
[Blend.Children] = {
|
|
96
92
|
Blend.New "UICorner" {
|
|
97
|
-
CornerRadius = UDim.new(1, 0)
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
93
|
+
CornerRadius = UDim.new(1, 0);
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
};
|
|
104
100
|
}):Subscribe())
|
|
105
101
|
|
|
106
102
|
local PERIOD = 2
|
|
107
103
|
maid:GiveTask(RunService.RenderStepped:Connect(function()
|
|
108
|
-
isVisible.Value = os.clock()
|
|
104
|
+
isVisible.Value = os.clock()/PERIOD % 1 < 0.5
|
|
109
105
|
end))
|
|
110
106
|
|
|
111
107
|
local alive = true
|
|
@@ -114,7 +110,7 @@ return function(target)
|
|
|
114
110
|
end)
|
|
115
111
|
maid:GiveTask(isVisible.Changed:Connect(function()
|
|
116
112
|
if not isVisible.Value then
|
|
117
|
-
task.delay(PERIOD
|
|
113
|
+
task.delay(PERIOD/2, function()
|
|
118
114
|
if alive then
|
|
119
115
|
userIdState.Value = Random.new():NextInteger(1, 1e9)
|
|
120
116
|
end
|
|
@@ -125,4 +121,4 @@ return function(target)
|
|
|
125
121
|
return function()
|
|
126
122
|
maid:DoCleaning()
|
|
127
123
|
end
|
|
128
|
-
end
|
|
124
|
+
end
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
@class BlendSingle.story
|
|
3
3
|
]]
|
|
4
4
|
|
|
5
|
-
local require =
|
|
6
|
-
require(game:GetService("ServerScriptService"):FindFirstChild("LoaderUtils", true).Parent).bootstrapStory(script)
|
|
5
|
+
local require = require(game:GetService("ServerScriptService"):FindFirstChild("LoaderUtils", true).Parent).bootstrapStory(script)
|
|
7
6
|
|
|
8
|
-
local Blend = require("Blend")
|
|
9
7
|
local Maid = require("Maid")
|
|
10
8
|
local Observable = require("Observable")
|
|
9
|
+
local Blend = require("Blend")
|
|
11
10
|
|
|
12
11
|
return function(target)
|
|
13
12
|
local maid = Maid.new()
|
|
@@ -16,10 +15,10 @@ return function(target)
|
|
|
16
15
|
|
|
17
16
|
local result = Blend.Single(Blend.Dynamic(state, function(text)
|
|
18
17
|
return Blend.New "TextLabel" {
|
|
19
|
-
Parent = target
|
|
20
|
-
Text = text
|
|
21
|
-
Size = UDim2.new(1, 0, 1, 0)
|
|
22
|
-
BackgroundTransparency = 0.5
|
|
18
|
+
Parent = target;
|
|
19
|
+
Text = text;
|
|
20
|
+
Size = UDim2.new(1, 0, 1, 0);
|
|
21
|
+
BackgroundTransparency = 0.5;
|
|
23
22
|
[function()
|
|
24
23
|
return Observable.new(function()
|
|
25
24
|
local internal = Maid.new()
|
|
@@ -31,10 +30,11 @@ return function(target)
|
|
|
31
30
|
|
|
32
31
|
return internal
|
|
33
32
|
end)
|
|
34
|
-
end] = true
|
|
33
|
+
end] = true;
|
|
35
34
|
}
|
|
36
35
|
end))
|
|
37
36
|
|
|
37
|
+
|
|
38
38
|
maid:GiveTask(result:Subscribe())
|
|
39
39
|
|
|
40
40
|
state.Value = "b"
|
|
@@ -42,4 +42,4 @@ return function(target)
|
|
|
42
42
|
return function()
|
|
43
43
|
maid:DoCleaning()
|
|
44
44
|
end
|
|
45
|
-
end
|
|
45
|
+
end
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
@class Blend.story
|
|
3
3
|
]]
|
|
4
4
|
|
|
5
|
-
local require =
|
|
6
|
-
require(game:GetService("ServerScriptService"):FindFirstChild("LoaderUtils", true).Parent).bootstrapStory(script)
|
|
5
|
+
local require = require(game:GetService("ServerScriptService"):FindFirstChild("LoaderUtils", true).Parent).bootstrapStory(script)
|
|
7
6
|
|
|
8
7
|
local RunService = game:GetService("RunService")
|
|
9
8
|
|
|
@@ -16,43 +15,40 @@ return function(target)
|
|
|
16
15
|
local isVisible = Instance.new("BoolValue")
|
|
17
16
|
isVisible.Value = false
|
|
18
17
|
|
|
19
|
-
local percentVisible = Blend.Spring(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
end),
|
|
23
|
-
35
|
|
24
|
-
)
|
|
18
|
+
local percentVisible = Blend.Spring(Blend.Computed(isVisible, function(visible)
|
|
19
|
+
return visible and 1 or 0
|
|
20
|
+
end), 35)
|
|
25
21
|
|
|
26
22
|
local transparency = Blend.Computed(percentVisible, function(percent)
|
|
27
23
|
return 1 - percent
|
|
28
24
|
end)
|
|
29
25
|
|
|
30
26
|
maid:GiveTask((Blend.New "Frame" {
|
|
31
|
-
Size = UDim2.new(0.5, 0, 0.5, 0)
|
|
32
|
-
BackgroundColor3 = Color3.new(0.9, 0.9, 0.9)
|
|
33
|
-
AnchorPoint = Vector2.new(0.5, 0.5)
|
|
34
|
-
Position = UDim2.new(0.5, 0, 0.5, 0)
|
|
35
|
-
BackgroundTransparency = transparency
|
|
36
|
-
Parent = target
|
|
27
|
+
Size = UDim2.new(0.5, 0, 0.5, 0);
|
|
28
|
+
BackgroundColor3 = Color3.new(0.9, 0.9, 0.9);
|
|
29
|
+
AnchorPoint = Vector2.new(0.5, 0.5);
|
|
30
|
+
Position = UDim2.new(0.5, 0, 0.5, 0);
|
|
31
|
+
BackgroundTransparency = transparency;
|
|
32
|
+
Parent = target;
|
|
37
33
|
|
|
38
34
|
[Blend.Children] = {
|
|
39
35
|
Blend.New "UIScale" {
|
|
40
36
|
Scale = Blend.Computed(percentVisible, function(percent)
|
|
41
|
-
return 0.8 + 0.2
|
|
42
|
-
end)
|
|
43
|
-
}
|
|
37
|
+
return 0.8 + 0.2*percent
|
|
38
|
+
end);
|
|
39
|
+
};
|
|
44
40
|
Blend.New "UICorner" {
|
|
45
|
-
CornerRadius = UDim.new(0.05, 0)
|
|
46
|
-
}
|
|
47
|
-
}
|
|
41
|
+
CornerRadius = UDim.new(0.05, 0);
|
|
42
|
+
};
|
|
43
|
+
};
|
|
48
44
|
}):Subscribe())
|
|
49
45
|
|
|
50
46
|
local PERIOD = 5
|
|
51
47
|
maid:GiveTask(RunService.RenderStepped:Connect(function()
|
|
52
|
-
isVisible.Value = os.clock()
|
|
48
|
+
isVisible.Value = os.clock()/PERIOD % 1 < 0.5
|
|
53
49
|
end))
|
|
54
50
|
|
|
55
51
|
return function()
|
|
56
52
|
maid:DoCleaning()
|
|
57
53
|
end
|
|
58
|
-
end
|
|
54
|
+
end
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
@class BlendTextbox.story
|
|
3
3
|
]]
|
|
4
4
|
|
|
5
|
-
local require =
|
|
6
|
-
require(game:GetService("ServerScriptService"):FindFirstChild("LoaderUtils", true).Parent).bootstrapStory(script)
|
|
5
|
+
local require = require(game:GetService("ServerScriptService"):FindFirstChild("LoaderUtils", true).Parent).bootstrapStory(script)
|
|
7
6
|
|
|
8
7
|
local Blend = require("Blend")
|
|
9
8
|
local Maid = require("Maid")
|
|
@@ -14,46 +13,42 @@ return function(target)
|
|
|
14
13
|
local state = Blend.State("hi")
|
|
15
14
|
|
|
16
15
|
maid:GiveTask((Blend.New "Frame" {
|
|
17
|
-
Size = UDim2.new(1, 0, 1, 0)
|
|
18
|
-
BackgroundTransparency = 1
|
|
19
|
-
Parent = target
|
|
16
|
+
Size = UDim2.new(1, 0, 1, 0);
|
|
17
|
+
BackgroundTransparency = 1;
|
|
18
|
+
Parent = target;
|
|
20
19
|
|
|
21
20
|
[Blend.Children] = {
|
|
22
21
|
Blend.New "TextBox" {
|
|
23
|
-
Size = UDim2.new(0, 200, 0, 50)
|
|
24
|
-
Text = state
|
|
25
|
-
[Blend.OnChange "Text"] = state
|
|
22
|
+
Size = UDim2.new(0, 200, 0, 50);
|
|
23
|
+
Text = state;
|
|
24
|
+
[Blend.OnChange "Text"] = state;
|
|
26
25
|
[Blend.OnEvent "Focused"] = function()
|
|
27
26
|
print("Focused")
|
|
28
|
-
end
|
|
27
|
+
end;
|
|
29
28
|
|
|
30
|
-
[function(inst)
|
|
31
|
-
return inst.Focused
|
|
32
|
-
end] = function()
|
|
29
|
+
[function(inst) return inst.Focused end] = function()
|
|
33
30
|
print("Focused (via func)")
|
|
34
|
-
end
|
|
31
|
+
end;
|
|
35
32
|
|
|
36
33
|
-- this also works
|
|
37
|
-
[function(inst)
|
|
38
|
-
return inst:GetPropertyChangedSignal("Text")
|
|
39
|
-
end] = function()
|
|
34
|
+
[function(inst) return inst:GetPropertyChangedSignal("Text") end] = function()
|
|
40
35
|
print("Property changed from :GetPropertyChangedSignal()")
|
|
41
|
-
end
|
|
42
|
-
}
|
|
36
|
+
end;
|
|
37
|
+
};
|
|
43
38
|
|
|
44
39
|
Blend.New "TextBox" {
|
|
45
|
-
Size = UDim2.new(0, 200, 0, 50)
|
|
46
|
-
[Blend.OnChange "Text"] = state
|
|
47
|
-
Text = state
|
|
48
|
-
}
|
|
40
|
+
Size = UDim2.new(0, 200, 0, 50);
|
|
41
|
+
[Blend.OnChange "Text"] = state; -- read state
|
|
42
|
+
Text = state; -- write state
|
|
43
|
+
};
|
|
49
44
|
|
|
50
45
|
Blend.New "UIListLayout" {
|
|
51
|
-
Padding = UDim.new(0, 10)
|
|
52
|
-
}
|
|
53
|
-
}
|
|
46
|
+
Padding = UDim.new(0, 10);
|
|
47
|
+
};
|
|
48
|
+
};
|
|
54
49
|
}):Subscribe())
|
|
55
50
|
|
|
56
51
|
return function()
|
|
57
52
|
maid:DoCleaning()
|
|
58
53
|
end
|
|
59
|
-
end
|
|
54
|
+
end
|
|
@@ -10,15 +10,15 @@ local PlayerGuiUtils = require("PlayerGuiUtils")
|
|
|
10
10
|
local state = Blend.State("a")
|
|
11
11
|
|
|
12
12
|
Blend.New "ScreenGui" {
|
|
13
|
-
Parent = PlayerGuiUtils.getPlayerGui()
|
|
13
|
+
Parent = PlayerGuiUtils.getPlayerGui();
|
|
14
14
|
[Blend.Children] = {
|
|
15
15
|
Blend.New "TextLabel" {
|
|
16
|
-
Size = UDim2.new(0, 100, 0, 50)
|
|
17
|
-
Position = UDim2.new(0.5, 0, 0.5, 0)
|
|
18
|
-
AnchorPoint = Vector2.new(0.5, 0.5)
|
|
19
|
-
Text = state
|
|
20
|
-
}
|
|
21
|
-
}
|
|
16
|
+
Size = UDim2.new(0, 100, 0, 50);
|
|
17
|
+
Position = UDim2.new(0.5, 0, 0.5, 0);
|
|
18
|
+
AnchorPoint = Vector2.new(0.5, 0.5);
|
|
19
|
+
Text = state;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
state.Value = "hi"
|
|
24
|
+
state.Value = "hi"
|