1
0
mirror of https://github.com/kepler155c/opus synced 2025-07-05 19:42:52 +00:00
opus/sys/modules/opus/ui/components/DropMenuItem.lua
2020-04-21 22:32:12 -06:00

19 lines
476 B
Lua

local class = require('opus.class')
local UI = require('opus.ui')
UI.DropMenuItem = class(UI.Button)
UI.DropMenuItem.defaults = {
UIElement = 'DropMenuItem',
textColor = 'black',
backgroundColor = 'white',
textFocusColor = 'white',
textInactiveColor = 'lightGray',
backgroundFocusColor = 'lightGray',
}
function UI.DropMenuItem:eventHandler(event)
if event.type == 'button_activate' then
self.parent:disable()
end
return UI.Button.eventHandler(self, event)
end