add keyboard focus

This commit is contained in:
airstruck
2015-10-31 04:21:50 -04:00
parent b3b4f90b23
commit 1e668f8f09
13 changed files with 233 additions and 79 deletions
+2 -1
View File
@@ -14,6 +14,7 @@ return function (self)
type = 'text',
align = 'middle center',
margin = 0,
canFocus = false,
}
local increment = self:addChild {
@@ -31,7 +32,7 @@ return function (self)
local function updateValue ()
if not self.options then return end
local option = self.options[self.index]
self.value = option.value
self:setValue(option.value)
view.text = option.text
end