opus/sys/modules/opus/ui/components/Tab.lua

22 lines
457 B
Lua
Raw Normal View History

local class = require('opus.class')
local UI = require('opus.ui')
2019-02-06 04:03:57 +00:00
UI.Tab = class(UI.Window)
2019-02-06 04:03:57 +00:00
UI.Tab.defaults = {
UIElement = 'Tab',
2020-04-27 01:39:58 +00:00
title = 'tab',
2019-02-06 04:03:57 +00:00
y = 2,
}
function UI.Tab:draw()
if not self.noFill then
self:fillArea(1, 1, self.width, self.height, string.rep('\127', self.width), colors.black, colors.gray)
end
self:drawChildren()
end
2020-04-27 01:39:58 +00:00
function UI.Tab:enable()
UI.Window.enable(self)
self:emit({ type = 'tab_activate', activated = self })
end