yui/spacer.lua

16 lines
334 B
Lua
Raw Normal View History

local BASE = (...):gsub('spacer$', '')
2022-08-15 23:41:17 +02:00
2022-08-16 00:23:52 +02:00
local Widget = require(BASE..'widget')
2022-08-15 23:41:17 +02:00
-- Spacers don't accept focus
local Spacer = setmetatable({
nofocus = true,
__call = function(cls, args) return cls.new(args) end
}, Widget)
2022-08-15 23:41:17 +02:00
Spacer.__index = Spacer
function Spacer.new(args) return setmetatable(args, Spacer) end
2022-08-15 23:41:17 +02:00
return Spacer