onMouseScreenTapDown method

void onMouseScreenTapDown(
  1. int pointer,
  2. Vector2 position,
  3. MouseButton button
)

Implementation

void onMouseScreenTapDown(int pointer, Vector2 position, MouseButton button) {
  Vector2 realPosition = position;
  if (!isHud) {
    realPosition = gameRef.screenToWorld(realPosition);
  }
  if (containsPoint(realPosition)) {
    _buttonClicked = button;
    _pointer = pointer;
    onMouseTapDown(pointer, position, button);
  }
}