handleSdlEvent method

  1. @override
void handleSdlEvent(
  1. Event event
)
override

Handle an SDL event.

This method will be called only if the event in question is not consumed by game.

Implementation

@override
void handleSdlEvent(final Event event) {
  if (event is KeyboardEvent &&
      event.repeat == false &&
      event.key.modifiers.isEmpty &&
      event.key.scancode == skipScanCode &&
      event.state == PressedState.pressed) {
    skip();
  } else if (event is ControllerButtonEvent &&
      event.button == skipControllerButton &&
      event.state == PressedState.pressed) {
    skip();
  } else {
    super.handleSdlEvent(event);
  }
}