LoveFrames/demo/examples/collapsiblecategory.lua

28 lines
726 B
Lua
Raw Permalink Normal View History

2019-03-06 23:19:58 +00:00
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