mirror of
https://github.com/linux-man/LoveFrames.git
synced 2024-11-18 16:04:22 +00:00
28 lines
726 B
Lua
28 lines
726 B
Lua
|
local example = {}
|
||
|
example.title = "Collapsible Category"
|
||
|
example.category = "Object Demonstrations"
|
||
|
|
||
|
function example.func(loveframes, centerarea)
|
||
|
|
||
|
local frame = loveframes.Create("frame")
|
||
|
frame:SetName("Collapsible Category")
|
||
|
frame:SetSize(500, 300)
|
||
|
frame:CenterWithinArea(unpack(centerarea))
|
||
|
|
||
|
local panel = loveframes.Create("panel")
|
||
|
panel:SetHeight(230)
|
||
|
|
||
|
local text = loveframes.Create("text", panel)
|
||
|
text:SetText("Collapsible Category")
|
||
|
|
||
|
local collapsiblecategory = loveframes.Create("collapsiblecategory", frame)
|
||
|
collapsiblecategory:SetPos(5, 30)
|
||
|
collapsiblecategory:SetSize(490, 265)
|
||
|
collapsiblecategory:SetText("Category 1")
|
||
|
collapsiblecategory:SetObject(panel)
|
||
|
|
||
|
text:Center()
|
||
|
|
||
|
end
|
||
|
|
||
|
return example
|