I would like to scale and position a FancyButton after setting its defaultView to a simple Sprite. However, both properties are missing.
Example:
import { FancyButton } from '@pixi/ui'
class MenuButton extends FancyButton {
constructor() {
super()
this.defaultView = `shared_button_accept`
this.scale.set(0.5) // Property 'scale' does not exist on type 'MenuButton'.
this.position.set(500, 500) // Property 'position' does not exist on type 'MenuButton'.
}
}
After some experiments, I found out that the button is absolutely fine despite the errors mentioned above. It is scaled down 50% of its original size and placed at x = 500 and y = 500.
Am I doing something wrong?
Expected Behavior
scale and position properties available for alternation.
Current Behavior
Both properties do not exist but are still editable.
I would like to scale and position a
FancyButton
after setting itsdefaultView
to a simpleSprite
. However, both properties are missing.Example:
After some experiments, I found out that the button is absolutely fine despite the errors mentioned above. It is scaled down 50% of its original size and placed at
x = 500
andy = 500
.Am I doing something wrong?
Expected Behavior
scale
andposition
properties available for alternation.Current Behavior
Both properties do not exist but are still editable.
Environment