mirror of
https://github.com/airstruck/luigi.git
synced 2025-12-18 18:06:44 +00:00
allow events bound to widget classes
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user