mirror of
https://github.com/kepler155c/opus
synced 2024-11-16 05:34:49 +00:00
22 lines
541 B
Lua
22 lines
541 B
Lua
local class = require('class')
|
|
local UI = require('ui')
|
|
|
|
local colors = _G.colors
|
|
|
|
--[[-- DropMenuItem --]]--
|
|
UI.DropMenuItem = class(UI.Button)
|
|
UI.DropMenuItem.defaults = {
|
|
UIElement = 'DropMenuItem',
|
|
textColor = colors.black,
|
|
backgroundColor = colors.white,
|
|
textFocusColor = colors.white,
|
|
textInactiveColor = colors.lightGray,
|
|
backgroundFocusColor = colors.lightGray,
|
|
}
|
|
function UI.DropMenuItem:eventHandler(event)
|
|
if event.type == 'button_activate' then
|
|
self.parent:hide()
|
|
end
|
|
return UI.Button.eventHandler(self, event)
|
|
end
|