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

19 lines
476 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.DropMenuItem = class(UI.Button)
UI.DropMenuItem.defaults = {
UIElement = 'DropMenuItem',
textColor = 'black',
backgroundColor = 'white',
textFocusColor = 'white',
textInactiveColor = 'lightGray',
backgroundFocusColor = 'lightGray',
2019-02-06 04:03:57 +00:00
}
function UI.DropMenuItem:eventHandler(event)
if event.type == 'button_activate' then
self.parent:disable()
2019-02-06 04:03:57 +00:00
end
return UI.Button.eventHandler(self, event)
end