TabBarMenuItem
Description
ComputerCraft OS
Installation
Copy one of these commands into your ComputerCraft terminal:
wget:
wget https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/modules/opus/ui/components/TabBarMenuItem.lua tabbarmenuitemArchive:
wget https://cc.shobie.xyz/cc/get/gh-kepler155c-opus-sys-modules-opus-ui-components-tabbarmenuitem tabbarmenuitem
Quick Install:
wget https://cc.shobie.xyz/cc/get/gh-kepler155c-opus-sys-modules-opus-ui-components-tabbarmenuitem TabBarMenuItem
Usage
Run: TabBarMenuItem
Tags
Source
View Original SourceCode Preview
local class = require('opus.class')
local UI = require('opus.ui')
UI.TabBarMenuItem = class(UI.Button)
UI.TabBarMenuItem.defaults = {
UIElement = 'TabBarMenuItem',
event = 'tab_select',
}
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