mirror of
https://github.com/linux-man/LoveFrames.git
synced 2024-11-18 16:04:22 +00:00
26 lines
556 B
Lua
26 lines
556 B
Lua
|
local example = {}
|
||
|
example.title = "Form"
|
||
|
example.category = "Object Demonstrations"
|
||
|
|
||
|
function example.func(loveframes, centerarea)
|
||
|
|
||
|
local frame = loveframes.Create("frame")
|
||
|
frame:SetName("Form")
|
||
|
frame:SetSize(500, 80)
|
||
|
frame:CenterWithinArea(unpack(centerarea))
|
||
|
|
||
|
local form = loveframes.Create("form", frame)
|
||
|
form:SetPos(5, 25)
|
||
|
form:SetSize(490, 65)
|
||
|
form:SetLayoutType("horizontal")
|
||
|
|
||
|
for i=1, 3 do
|
||
|
local button = loveframes.Create("button")
|
||
|
button:SetText(i)
|
||
|
button:SetWidth((490/3) - 7)
|
||
|
form:AddItem(button)
|
||
|
end
|
||
|
|
||
|
end
|
||
|
|
||
|
return example
|