SpriteButtonComponent constructor

SpriteButtonComponent({
  1. Sprite? button,
  2. Sprite? buttonDown,
  3. void onPressed()?,
  4. Vector2? position,
  5. Vector2? size,
  6. Vector2? scale,
  7. double? angle,
  8. Anchor? anchor,
  9. Iterable<Component>? children,
  10. int? priority,
})

Implementation

SpriteButtonComponent({
  Sprite? button,
  Sprite? buttonDown,
  this.onPressed,
  super.position,
  Vector2? size,
  super.scale,
  super.angle,
  super.anchor,
  super.children,
  super.priority,
})  : _button = button,
      _buttonDown = buttonDown,
      super(
        current: ButtonState.up,
        size: size ?? button?.originalSize,
      );