toControllerTouchpadEventType method

ControllerTouchpadEventType toControllerTouchpadEventType()

Convert to a controller touch event type.

Implementation

ControllerTouchpadEventType toControllerTouchpadEventType() {
  switch (this) {
    case SDL_EventType.SDL_CONTROLLERTOUCHPADDOWN:
      return ControllerTouchpadEventType.down;
    case SDL_EventType.SDL_CONTROLLERTOUCHPADMOTION:
      return ControllerTouchpadEventType.motion;
    case SDL_EventType.SDL_CONTROLLERTOUCHPADUP:
      return ControllerTouchpadEventType.up;
    default:
      throw SdlError(this, 'Invalid controller touch pad event type.');
  }
}