hotkeys use modifiers

This commit is contained in:
airstruck
2015-11-11 23:49:54 -05:00
parent 68a250e273
commit 6aaa128463
13 changed files with 205 additions and 113 deletions

View File

@@ -132,15 +132,14 @@ local function initialize (self)
key = ' '
edgeType = 'menu.expander'
else
key = key:gsub('%f[%w].', string.upper)
key = key:gsub('%f[%w].', string.upper) -- :gsub('-', '+')
end
self.height = self.fontData:getLineHeight() + pad * 2
self.flow = 'x'
self:addChild({ icon = icon, width = self.height })
self:addChild({ text = text, width = textWidth })
self:addChild({ text = key, align = 'middle right',
minwidth = self.height,
textColor = keyColor, type = edgeType })
self:addChild { icon = icon, width = self.height }
self:addChild { text = text, width = textWidth }
self:addChild { text = key, align = 'middle right',
minwidth = self.height, textColor = keyColor, type = edgeType }
self.icon = nil
self.text = nil