mirror of
https://github.com/linux-man/LoveFrames.git
synced 2024-11-26 05:14:21 +00:00
21 lines
491 B
Lua
21 lines
491 B
Lua
local example = {}
|
|
example.title = "Image Button"
|
|
example.category = "Object Demonstrations"
|
|
|
|
function example.func(loveframes, centerarea)
|
|
|
|
local frame = loveframes.Create("frame")
|
|
frame:SetName("Image Button")
|
|
frame:SetSize(138, 163)
|
|
frame:CenterWithinArea(unpack(centerarea))
|
|
|
|
local imagebutton = loveframes.Create("imagebutton", frame)
|
|
imagebutton:SetImage("resources/magic.png")
|
|
imagebutton:SetPos(5, 30)
|
|
imagebutton:SizeToImage()
|
|
imagebutton:Center()
|
|
|
|
end
|
|
|
|
return example
|