Button constructor

Button({
  1. required SpriteFrame normal,
  2. Future onClick(
    1. Button
    )?,
  3. SpriteFrame? selected,
  4. double? padding,
  5. Point<double>? shift,
})

Implementation

Button(
    {required this.normal,
    this.onClick,
    this.selected,
    this.padding,
    this.shift}) {
  setContentSize(normal.rect.size);
  setAnchorPoint(Point<double>(0.5, 0.5));
}