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