Implemented stacked button groups.
This commit is contained in:
@@ -245,7 +245,7 @@ const buttonGroup14 = new ButtonGroup({
|
||||
{label: 'Stacked button 7', action: event => console.log('clicked 7')},
|
||||
{label: 'Stacked button 8', action: event => console.log('clicked 8')}
|
||||
],
|
||||
stacked: true,
|
||||
stackPadding: 6,
|
||||
maxWidth: 620,
|
||||
app
|
||||
})
|
||||
@@ -263,18 +263,30 @@ const buttonGroup15 = new ButtonGroup({
|
||||
{icon: 'battery_charging_full', type: 'checkbox', iconColorActive: 0x9c71b7}
|
||||
],
|
||||
orientation: 'vertical',
|
||||
margin: 0,
|
||||
stacked: true,
|
||||
margin: 1,
|
||||
maxHeight: 200,
|
||||
app
|
||||
})
|
||||
|
||||
const buttons16 = []
|
||||
for (let i = 1; i < 51; i++) {
|
||||
buttons16.push({label: `Button ${i}`, stroke: Math.floor(Math.random() * 16777215), strokeWidth: 3, radius: 16})
|
||||
}
|
||||
const buttonGroup16 = new ButtonGroup({
|
||||
x: 90,
|
||||
y: 1040,
|
||||
buttons: buttons16,
|
||||
stackPadding: 3,
|
||||
maxWidth: 700,
|
||||
app
|
||||
})
|
||||
|
||||
app.scene.addChild(buttonGroup1, buttonGroup2, buttonGroup3)
|
||||
app.scene.addChild(buttonGroup4)
|
||||
app.scene.addChild(buttonGroup5, buttonGroup6)
|
||||
app.scene.addChild(buttonGroup7, buttonGroup8)
|
||||
app.scene.addChild(buttonGroup9, buttonGroup10, buttonGroup11, buttonGroup12, buttonGroup13)
|
||||
app.scene.addChild(buttonGroup14, buttonGroup15)
|
||||
app.scene.addChild(buttonGroup14, buttonGroup15, buttonGroup16)
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user