Added textAlpha and textActiveAlpha to Button and ButtonGroup.

This commit is contained in:
2019-10-15 14:56:24 +02:00
parent e50ea6af31
commit e2ea89cc0b
73 changed files with 440 additions and 161 deletions
+7 -1
View File
@@ -1527,6 +1527,8 @@ export default class Button extends PIXI.Container {
* for possible options.
* @param {number} [opts.textStyleActive=Theme.textStyleActive] - A textstyle object for the styling of the label when the
* button is activated. See PIXI.TextStyle for possible options.
* @param {number} [opts.textAlpha=Theme.textAlpha] - The alpha value of the text.
* @param {number} [opts.textActiveAlpha=Theme.textActiveAlpha] - The alpha value of the text when activated.
* @param {string} [opts.style=default] - A shortcut for styling options. Possible values are default, link.
* @param {number} [opts.radius=Theme.radius] - The radius of the four corners of the button (which is a rounded rectangle).
* @param {boolean} [opts.disabled=false] - Is the button disabled? When disabled, the button has a lower alpha value
@@ -1584,6 +1586,8 @@ export default class Button extends PIXI.Container {
strokeActiveAlpha: theme.strokeActiveAlpha,
textStyle: {},
textStyleActive: {},
textAlpha: theme.textAlpha,
textActiveAlpha: theme.textActiveAlpha,
style: 'default',
radius: theme.radius,
disabled: false,
@@ -2012,10 +2016,12 @@ export default class Button extends PIXI.Container {
if (this._active) {
if (this.text) {
this.text.style = this.opts.textStyleActive
this.text.alpha = this.opts.textActiveAlpha
}
} else {
if (this.text) {
this.text.style = this.opts.textStyle
this.text.alpha = this.opts.textAlpha
}
}
@@ -2171,7 +2177,7 @@ export default class Button extends PIXI.Container {
<footer class="content-size">
<div class="footer">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Fri Oct 11 2019 09:19:28 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Oct 15 2019 14:56:00 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>