create "pseudo-widget" for option groups

This commit is contained in:
airstruck
2016-01-28 21:28:30 -05:00
parent 2e91a62426
commit e53f470bb9
4 changed files with 37 additions and 9 deletions
+5 -4
View File
@@ -89,11 +89,12 @@ return { id = 'mainWindow',
{ type = 'check', text = 'Vertical controls', id = 'flowToggle', },
{ type = 'label', text = 'Some radio widgets' },
{
{ type = 'radio', text = 'One fish' },
{ type = 'radio', text = 'Two fish' },
{ type = 'radio', text = 'Red fish' },
{ type = 'radio', text = 'Blue fish' },
{ type = 'radio', group = 'fish', text = 'One fish' },
{ type = 'radio', group = 'fish', text = 'Two fish' },
{ type = 'radio', group = 'fish', text = 'Red fish' },
{ type = 'radio', group = 'fish', text = 'Blue fish' },
},
{ type = 'label', id = 'fishStatus' },
}
},
},
+4
View File
@@ -96,6 +96,10 @@ layout.sans2:onPress(function()
layout.stepper.font = false
end)
layout.fish:onChange(function()
layout.fishStatus.text = 'Selected: ' .. layout.fish.selected.text
end)
-- show the main layout
layout:show()