toEventAction method

EventAction toEventAction()

Convert from a SDL_eventaction member.

Implementation

EventAction toEventAction() {
  switch (this) {
    case SDL_eventaction.SDL_ADDEVENT:
      return EventAction.addevent;
    case SDL_eventaction.SDL_PEEKEVENT:
      return EventAction.peekevent;
    case SDL_eventaction.SDL_GETEVENT:
      return EventAction.getevent;
    default:
      throw SdlError(
        this,
        'Unrecognised `SDL_eventaction` member.',
      );
  }
}