toTouchEventType method

TouchFingerEventType toTouchEventType()

Convert to a touch event type.

Implementation

TouchFingerEventType toTouchEventType() {
  switch (this) {
    case SDL_EventType.SDL_FINGERMOTION:
      return TouchFingerEventType.motion;
    case SDL_EventType.SDL_FINGERDOWN:
      return TouchFingerEventType.down;
    case SDL_EventType.SDL_FINGERUP:
      return TouchFingerEventType.up;
    default:
      throw SdlError(this, 'Invalid touch event type.');
  }
}