toMouseWheelDirection method
Convert from a SDL_MouseWheelDirection
member.
Implementation
MouseWheelDirection toMouseWheelDirection() {
switch (this) {
case SDL_MouseWheelDirection.SDL_MOUSEWHEEL_NORMAL:
return MouseWheelDirection.normal;
case SDL_MouseWheelDirection.SDL_MOUSEWHEEL_FLIPPED:
return MouseWheelDirection.flipped;
default:
throw SdlError(
this,
'Unrecognised `SDL_MouseWheelDirection` member.',
);
}
}