Interface GamepadSource

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface GamepadSource
Where the controllers' state comes from. The extension polls GLFW by default; tests and parity scripts swap in made-up state with GamepadExtension.useSource(GamepadSource).
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Writes the current state of every controller into into, which starts out empty: poll everything, then fill.
  • Method Details

    • read

      void read(GamepadState into)
      Writes the current state of every controller into into, which starts out empty: poll everything, then fill. Called once per batch of ticks, on the window thread.
      Parameters:
      into - the state to fill, reused between polls