Added getter and setter for maxWidth and maxHeight for button groups.

This commit is contained in:
2019-08-02 10:15:49 +02:00
parent 81e21736b7
commit e8a64fb014
71 changed files with 558 additions and 124 deletions
+28
View File
@@ -371,6 +371,34 @@ export default class ButtonGroup extends PIXI.Container {
this.buttons.forEach(it => (it.disabled = value))
}
/**
* Gets or sets the maximum width of the button group for stacking. Usefull when you want to resize the available space.
*
* @member {number}
*/
get maxWidth() {
return this.opts.maxWidth
}
set maxWidth(value) {
this.opts.maxWidth = value
this.layout()
}
/**
* Gets or sets the maximum height of the button group for stacking. Usefull when you want to resize the available space.
*
* @member {number}
*/
get maxHeight() {
return this.opts.maxHeight
}
set maxHeight(value) {
this.opts.maxHeight = value
this.layout()
}
/**
* Searches all buttons of the button group and returns the maximum width of one button.
*