toSystemCursor method

SystemCursor toSystemCursor()

Convert from a SDL_SystemCursor member.

Implementation

SystemCursor toSystemCursor() {
  switch (this) {
    case SDL_SystemCursor.SDL_SYSTEM_CURSOR_ARROW:
      return SystemCursor.arrow;
    case SDL_SystemCursor.SDL_SYSTEM_CURSOR_IBEAM:
      return SystemCursor.ibeam;
    case SDL_SystemCursor.SDL_SYSTEM_CURSOR_WAIT:
      return SystemCursor.wait;
    case SDL_SystemCursor.SDL_SYSTEM_CURSOR_CROSSHAIR:
      return SystemCursor.crosshair;
    case SDL_SystemCursor.SDL_SYSTEM_CURSOR_WAITARROW:
      return SystemCursor.waitarrow;
    case SDL_SystemCursor.SDL_SYSTEM_CURSOR_SIZENWSE:
      return SystemCursor.sizenwse;
    case SDL_SystemCursor.SDL_SYSTEM_CURSOR_SIZENESW:
      return SystemCursor.sizenesw;
    case SDL_SystemCursor.SDL_SYSTEM_CURSOR_SIZEWE:
      return SystemCursor.sizewe;
    case SDL_SystemCursor.SDL_SYSTEM_CURSOR_SIZENS:
      return SystemCursor.sizens;
    case SDL_SystemCursor.SDL_SYSTEM_CURSOR_SIZEALL:
      return SystemCursor.sizeall;
    case SDL_SystemCursor.SDL_SYSTEM_CURSOR_NO:
      return SystemCursor.no;
    case SDL_SystemCursor.SDL_SYSTEM_CURSOR_HAND:
      return SystemCursor.hand;
    case SDL_SystemCursor.SDL_NUM_SYSTEM_CURSORS:
      return SystemCursor.numSystemCursors;
    default:
      throw SdlError(
        this,
        'Unrecognised `SDL_SystemCursor` member.',
      );
  }
}