Working on stacked buttons.
This commit is contained in:
+6
-32
@@ -154,10 +154,7 @@ export default class Progress extends PIXI.Container {
|
||||
//-----------------
|
||||
if (this.opts.background) {
|
||||
this.background.clear()
|
||||
this.background.beginFill(
|
||||
this.opts.backgroundFill,
|
||||
this.opts.backgroundFillAlpha
|
||||
)
|
||||
this.background.beginFill(this.opts.backgroundFill, this.opts.backgroundFillAlpha)
|
||||
this.background.drawRect(0, 0, width, height)
|
||||
this.background.endFill()
|
||||
}
|
||||
@@ -201,20 +198,10 @@ export default class Progress extends PIXI.Container {
|
||||
const wantedWidth = this.opts.width || width - 2 * this.opts.margin
|
||||
const wantedHeight = this.opts.height
|
||||
|
||||
this.bar.lineStyle(
|
||||
this.opts.strokeWidth,
|
||||
this.opts.stroke,
|
||||
this.opts.strokeAlpha
|
||||
)
|
||||
this.bar.lineStyle(this.opts.strokeWidth, this.opts.stroke, this.opts.strokeAlpha)
|
||||
this.bar.beginFill(this.opts.fill, this.opts.fillAlpha)
|
||||
if (this.radius > 1) {
|
||||
this.bar.drawRoundedRect(
|
||||
0,
|
||||
0,
|
||||
wantedWidth,
|
||||
wantedHeight,
|
||||
this.radius
|
||||
)
|
||||
this.bar.drawRoundedRect(0, 0, wantedWidth, wantedHeight, this.radius)
|
||||
} else {
|
||||
this.bar.drawRect(0, 0, wantedWidth, wantedHeight)
|
||||
}
|
||||
@@ -238,24 +225,11 @@ export default class Progress extends PIXI.Container {
|
||||
|
||||
const barActiveWidth = (wantedWidth * this._progress) / 100
|
||||
|
||||
this.barActive.lineStyle(
|
||||
this.opts.strokeActiveWidth,
|
||||
this.opts.strokeActive,
|
||||
this.opts.strokeActiveAlpha
|
||||
)
|
||||
this.barActive.beginFill(
|
||||
this.opts.fillActive,
|
||||
this.opts.fillActiveAlpha
|
||||
)
|
||||
this.barActive.lineStyle(this.opts.strokeActiveWidth, this.opts.strokeActive, this.opts.strokeActiveAlpha)
|
||||
this.barActive.beginFill(this.opts.fillActive, this.opts.fillActiveAlpha)
|
||||
if (barActiveWidth > 0) {
|
||||
if (this.radius > 1) {
|
||||
this.barActive.drawRoundedRect(
|
||||
0,
|
||||
0,
|
||||
barActiveWidth,
|
||||
wantedHeight,
|
||||
this.radius
|
||||
)
|
||||
this.barActive.drawRoundedRect(0, 0, barActiveWidth, wantedHeight, this.radius)
|
||||
} else {
|
||||
this.barActive.drawRect(0, 0, barActiveWidth, wantedHeight)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user