2019-03-06 23:19:58 +00:00
|
|
|
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()
|
2020-04-28 17:02:00 +00:00
|
|
|
imagebutton:Center()
|
2019-03-06 23:19:58 +00:00
|
|
|
|
|
|
|
end
|
|
|
|
|
2020-04-28 17:02:00 +00:00
|
|
|
return example
|