mirror of
https://github.com/kepler155c/opus
synced 2025-11-17 07:47:11 +00:00
ui overhaul
This commit is contained in:
21
sys/apis/ui/components/DropMenuItem.lua
Normal file
21
sys/apis/ui/components/DropMenuItem.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
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
|
||||
Reference in New Issue
Block a user