minor cleanup
This commit is contained in:
@@ -7,8 +7,6 @@ UI.TabBar.defaults = {
|
||||
UIElement = 'TabBar',
|
||||
buttonClass = 'TabBarMenuItem',
|
||||
backgroundColor = 'black',
|
||||
selectedBackgroundColor = 'primary',
|
||||
unselectedBackgroundColor = 'tertiary',
|
||||
}
|
||||
function UI.TabBar:enable()
|
||||
UI.MenuBar.enable(self)
|
||||
|
||||
@@ -5,15 +5,16 @@ 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
|
||||
self.textColor = self:getProperty('selectedTextColor')
|
||||
else
|
||||
self.backgroundColor = self:getProperty('unselectedBackgroundColor')
|
||||
self.backgroundFocusColor = self.backgroundColor
|
||||
self.textColor = self:getProperty('unselectedTextColor')
|
||||
end
|
||||
UI.Button.draw(self)
|
||||
end
|
||||
|
||||
@@ -6,6 +6,10 @@ UI.Tabs = class(UI.Window)
|
||||
UI.Tabs.docs = { }
|
||||
UI.Tabs.defaults = {
|
||||
UIElement = 'Tabs',
|
||||
selectedBackgroundColor = 'primary',
|
||||
unselectedBackgroundColor = 'tertiary',
|
||||
unselectedTextColor = 'lightGray',
|
||||
selectedTextColor = 'black',
|
||||
}
|
||||
function UI.Tabs:postInit()
|
||||
self:add(self)
|
||||
|
||||
Reference in New Issue
Block a user