move apis into rom/modules/main for shell compatibility

This commit is contained in:
kepler155c@gmail.com
2019-06-28 13:50:02 -04:00
parent c3d52c1aab
commit 343ce7fdc2
135 changed files with 297 additions and 289 deletions

View File

@@ -0,0 +1,21 @@
local class = require('opus.class')
local UI = require('opus.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