mirror of
https://github.com/linux-man/LoveFrames.git
synced 2024-11-18 16:04:22 +00:00
25 lines
550 B
Lua
25 lines
550 B
Lua
local example = {}
|
|
example.title = "Globals Viewer"
|
|
example.category = "Example Implementations"
|
|
|
|
function example.func(loveframes, centerarea)
|
|
|
|
local frame = loveframes.Create("frame")
|
|
frame:SetName("Globals Viewer")
|
|
frame:SetSize(500, 300)
|
|
frame:CenterWithinArea(unpack(centerarea))
|
|
|
|
local glist = loveframes.Create("columnlist", frame)
|
|
glist:SetPos(5, 30)
|
|
glist:SetSize(490, 265)
|
|
glist:AddColumn("Key")
|
|
glist:AddColumn("Value")
|
|
|
|
for k, v in pairs(_G) do
|
|
local value_str = ""
|
|
glist:AddRow(k, tostring(v))
|
|
end
|
|
|
|
end
|
|
|
|
return example |