Spaces:
Running
Running
Corentin Cailleaud
commited on
Commit
•
dc11543
1
Parent(s):
f2816ad
cubzh.lua
CHANGED
@@ -43,7 +43,7 @@ local onboardingConfig = {
|
|
43 |
local ui = require("uikit")
|
44 |
local data = {}
|
45 |
data.ui = ui:createFrame(Color(0, 0, 0, 0.5))
|
46 |
-
local text = ui:createText("Hold click and drag to move camera", Color.White)
|
47 |
text:setParent(data.ui)
|
48 |
data.ui.parentDidResize = function()
|
49 |
data.ui.Width = text.Width + text.Height
|
@@ -73,7 +73,7 @@ local onboardingConfig = {
|
|
73 |
local ui = require("uikit")
|
74 |
local data = {}
|
75 |
data.ui = ui:createFrame(Color(0, 0, 0, 0.5))
|
76 |
-
local text = ui:createText("Use WASD/ZQSD to move", Color.White)
|
77 |
text:setParent(data.ui)
|
78 |
data.ui.parentDidResize = function()
|
79 |
data.ui.Width = text.Width + text.Height
|
@@ -97,6 +97,38 @@ local onboardingConfig = {
|
|
97 |
data.ui:remove()
|
98 |
end,
|
99 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
},
|
101 |
}
|
102 |
|
|
|
43 |
local ui = require("uikit")
|
44 |
local data = {}
|
45 |
data.ui = ui:createFrame(Color(0, 0, 0, 0.5))
|
46 |
+
local text = ui:createText("1/3 - Hold click and drag to move the camera.", Color.White)
|
47 |
text:setParent(data.ui)
|
48 |
data.ui.parentDidResize = function()
|
49 |
data.ui.Width = text.Width + text.Height
|
|
|
73 |
local ui = require("uikit")
|
74 |
local data = {}
|
75 |
data.ui = ui:createFrame(Color(0, 0, 0, 0.5))
|
76 |
+
local text = ui:createText("2/3 - Use WASD/ZQSD to move", Color.White)
|
77 |
text:setParent(data.ui)
|
78 |
data.ui.parentDidResize = function()
|
79 |
data.ui.Width = text.Width + text.Height
|
|
|
97 |
data.ui:remove()
|
98 |
end,
|
99 |
},
|
100 |
+
{
|
101 |
+
start = function(onboarding, step)
|
102 |
+
local ui = require("uikit")
|
103 |
+
local data = {}
|
104 |
+
data.ui = ui:createFrame(Color(0, 0, 0, 0.5))
|
105 |
+
local text = ui:createText("3/3 - Press Enter in front of a NPC to chat", Color.White)
|
106 |
+
text:setParent(data.ui)
|
107 |
+
data.ui.parentDidResize = function()
|
108 |
+
data.ui.Width = text.Width + text.Height
|
109 |
+
data.ui.Height = text.Height * 2
|
110 |
+
text.pos = { data.ui.Width * 0.5 - text.Width * 0.5, data.ui.Height * 0.5 - text.Height * 0.5 }
|
111 |
+
data.ui.pos =
|
112 |
+
{ Screen.Width * 0.5 - data.ui.Width * 0.5, Screen.Height * 0.2 - data.ui.Height * 0.5 }
|
113 |
+
end
|
114 |
+
data.ui:parentDidResize()
|
115 |
+
|
116 |
+
data.listener = LocalEvent:Listen(LocalEvent.Name.KeyboardInput, function(char, _, _, down)
|
117 |
+
if char == "\n" then
|
118 |
+
print("triggered")
|
119 |
+
Timer(1, function()
|
120 |
+
onboarding:next()
|
121 |
+
end)
|
122 |
+
data.listener:Remove()
|
123 |
+
end
|
124 |
+
end)
|
125 |
+
|
126 |
+
return data
|
127 |
+
end,
|
128 |
+
stop = function(_, data)
|
129 |
+
data.ui:remove()
|
130 |
+
end,
|
131 |
+
},
|
132 |
},
|
133 |
}
|
134 |
|