AdvancedButtonComponent constructor

AdvancedButtonComponent({
  1. void onPressed()?,
  2. void onReleased()?,
  3. void onChangeState(
    1. ButtonState state
    )?,
  4. PositionComponent? defaultSkin,
  5. PositionComponent? downSkin,
  6. PositionComponent? hoverSkin,
  7. PositionComponent? disabledSkin,
  8. PositionComponent? defaultLabel,
  9. PositionComponent? disabledLabel,
  10. Vector2? size,
  11. Vector2? position,
  12. Vector2? scale,
  13. double? angle,
  14. Anchor? anchor,
  15. Iterable<Component>? children,
  16. int? priority,
})

Implementation

AdvancedButtonComponent({
  this.onPressed,
  this.onReleased,
  this.onChangeState,
  PositionComponent? defaultSkin,
  PositionComponent? downSkin,
  PositionComponent? hoverSkin,
  PositionComponent? disabledSkin,
  PositionComponent? defaultLabel,
  PositionComponent? disabledLabel,
  super.size,
  super.position,
  super.scale,
  super.angle,
  super.anchor,
  super.children,
  super.priority,
}) {
  this.defaultSkin = defaultSkin;
  this.downSkin = downSkin;
  this.hoverSkin = hoverSkin;
  this.disabledSkin = disabledSkin;
  this.defaultLabel = defaultLabel;
  this.disabledLabel = disabledLabel;
  size.addListener(_updateSizes);
}