Try improve crash course

This commit is contained in:
Aaron Smith 2023-11-21 18:48:47 +00:00
parent c288cb92c4
commit 338c66ed57
11 changed files with 223 additions and 102 deletions

View file

@ -9,36 +9,31 @@ Luau allows us to omit parentheses `()` when calling functions with string or
table literals which Vide takes advantage of for brevity.
```lua
local mount = vide.mount
local create = vide.create
local function App()
return create "ScreenGui" {
create "Frame" {
AnchorPoint = Vector2.new(0.5, 0.5),
Position = UDim2.fromScale(0.5, 0.5),
Size = UDim2.fromScale(0.4, 0.7),
return create "ScreenGui" {
create "Frame" {
AnchorPoint = Vector2.new(0.5, 0.5),
Position = UDim2.fromScale(0.5, 0.5),
Size = UDim2.fromScale(0.4, 0.7),
create "TextLabel" {
Text = "hi"
},
create "TextLabel" {
Text = "hi"
},
create "TextLabel" {
Text = "bye"
},
create "TextLabel" {
Text = "bye"
},
create "TextButton" {
Text = "click me",
create "TextButton" {
Text = "click me",
Activated = function()
print "clicked!"
end
}
Activated = function()
print "clicked!"
end
}
}
end
mount(App, game.StarterGui)
}
```
Assign a value to a string key to set a property, and assign a value to a