dcearth/button.lua

32 lines
437 B
Lua

local t = {}
function t.onHover( button )
end
function t.onClick( button )
end
function t.newButton( name, tooltip, icon, x, y, w, h, callback )
return setmetatable( {
name = name,
tooltip = tooltip,
icon = icon,
x = x,
y = y,
w = w,
h = h,
callback = callback },
t )
end
function t.draw( button )
end
t.__index = t
t.__call = t.newButton
setmetatable( t, t )
return t