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