Spaces:
Running
Running
Corentin Cailleaud
commited on
Commit
•
f2816ad
1
Parent(s):
f29f54d
cubzh.lua
CHANGED
@@ -42,8 +42,17 @@ local onboardingConfig = {
|
|
42 |
start = function(onboarding, step)
|
43 |
local ui = require("uikit")
|
44 |
local data = {}
|
45 |
-
data.ui = ui:
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
data.listener = LocalEvent:Listen(LocalEvent.Name.PointerDrag, function()
|
49 |
Timer(1, function()
|
@@ -63,8 +72,17 @@ local onboardingConfig = {
|
|
63 |
start = function(onboarding, step)
|
64 |
local ui = require("uikit")
|
65 |
local data = {}
|
66 |
-
data.ui = ui:
|
67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
|
69 |
data.listener = LocalEvent:Listen(LocalEvent.Name.KeyboardInput, function()
|
70 |
Timer(1, function()
|
|
|
42 |
start = function(onboarding, step)
|
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
|
50 |
+
data.ui.Height = text.Height * 2
|
51 |
+
text.pos = { data.ui.Width * 0.5 - text.Width * 0.5, data.ui.Height * 0.5 - text.Height * 0.5 }
|
52 |
+
data.ui.pos =
|
53 |
+
{ Screen.Width * 0.5 - data.ui.Width * 0.5, Screen.Height * 0.2 - data.ui.Height * 0.5 }
|
54 |
+
end
|
55 |
+
data.ui:parentDidResize()
|
56 |
|
57 |
data.listener = LocalEvent:Listen(LocalEvent.Name.PointerDrag, function()
|
58 |
Timer(1, function()
|
|
|
72 |
start = function(onboarding, step)
|
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
|
80 |
+
data.ui.Height = text.Height * 2
|
81 |
+
text.pos = { data.ui.Width * 0.5 - text.Width * 0.5, data.ui.Height * 0.5 - text.Height * 0.5 }
|
82 |
+
data.ui.pos =
|
83 |
+
{ Screen.Width * 0.5 - data.ui.Width * 0.5, Screen.Height * 0.2 - data.ui.Height * 0.5 }
|
84 |
+
end
|
85 |
+
data.ui:parentDidResize()
|
86 |
|
87 |
data.listener = LocalEvent:Listen(LocalEvent.Name.KeyboardInput, function()
|
88 |
Timer(1, function()
|