Formalize type attribute and support it in styles

This commit is contained in:
airstruck
2015-12-02 15:48:21 -05:00
parent a902385d55
commit f03b5c7bd4
29 changed files with 302 additions and 344 deletions

View File

@@ -9,6 +9,8 @@ not be explicitly created.
--]]--
local ROOT = (...):gsub('[^.]*.[^.]*.[^.]*$', '')
local Backend = require(ROOT .. 'backend')
local Layout, Event
local function addLayoutChildren (self)
@@ -141,12 +143,14 @@ local function registerLayoutEvents (self)
end
end)
menuLayout:onEnter(activate)
menuLayout:onPressEnter(activate)
end
local function initialize (self)
if not self.fontData then
self.fontData = Backend.Font(self.font, self.size)
end
local pad = self.padding or 0
local isSubmenu = self.parentMenu and self.parentMenu.parentMenu
local text, key, icon = self.text or '', self.key or '', self.icon