dcearth/button.lua

32 lines
437 B
Lua
Raw Normal View History

2024-04-21 14:10:53 +00:00
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