allow events bound to widget classes

This commit is contained in:
airstruck
2015-10-27 10:20:13 -04:00
parent 61c9aacd94
commit ca67432b66
6 changed files with 96 additions and 92 deletions

View File

@@ -60,7 +60,7 @@ local mainForm = { title = "Test window", id = 'mainWindow', type = 'panel',
{ type = 'sash', width = 4, },
{ type = 'panel', id = 'rightSideBox', width = 200,
{ type = 'panel', text = 'A slider', align = 'bottom', height = 24, padding = 4 },
{ type = 'slider', height = 32, padding = 4 },
{ type = 'slider', height = 32, padding = 4, id = 'slidey', },
{ type = 'panel', text = 'A stepper', align = 'bottom', height = 24, padding = 4 },
{ type = 'stepper', height = 32, padding = 4, options = {
{ value = 1, text = 'Thing One' },
@@ -89,6 +89,11 @@ layout.leftSideBox:addChild {
align = 'middle right'
}
layout.slidey:onMotion(function (event)
layout.statusbar.text = event.x
return false
end)
--[[
local KEY_ESCAPE = 27