onMouseScreenTapUp method

void onMouseScreenTapUp(
  1. int pointer,
  2. Vector2 position
)

Implementation

void onMouseScreenTapUp(int pointer, Vector2 position) {
  Vector2 realPosition = position;
  if (!isHud) {
    realPosition = gameRef.screenToWorld(realPosition);
  }
  if (containsPoint(realPosition) &&
      pointer == _pointer &&
      _buttonClicked != null) {
    onMouseTapUp(pointer, position, _buttonClicked!);
    onMouseTap(_buttonClicked!);
  } else if (_buttonClicked != null) {
    onMouseCancel();
  }
  _buttonClicked = null;
}