Files
Opus/sys/modules/opus/ui/components/TabBarMenuItem.lua
kepler155c 7224d441ca Ui enhancements 2.0 (#31)
* canvas overhaul

* minor tweaks

* list mode for overview

* bugfixes + tweaks for editor 2.0

* minor tweaks

* more editor work

* refactor + new transitions

* use layout() where appropriate and cleanup

* mouse triple click + textEntry scroll ind

* cleanup

* cleanup + theme editor

* color rework + cleanup

* changes for deprecated ui methods

* can now use named colors
2020-04-21 22:40:59 -06:00

20 lines
564 B
Lua

local class = require('opus.class')
local UI = require('opus.ui')
UI.TabBarMenuItem = class(UI.Button)
UI.TabBarMenuItem.defaults = {
UIElement = 'TabBarMenuItem',
event = 'tab_select',
textInactiveColor = 'lightGray',
}
function UI.TabBarMenuItem:draw()
if self.selected then
self.backgroundColor = self:getProperty('selectedBackgroundColor')
self.backgroundFocusColor = self.backgroundColor
else
self.backgroundColor = self:getProperty('unselectedBackgroundColor')
self.backgroundFocusColor = self.backgroundColor
end
UI.Button.draw(self)
end