Class ControlsManager

java.lang.Object
group24.escaperoom.control.ControlsManager

public class ControlsManager extends Object
  • Constructor Details

    • ControlsManager

      public ControlsManager()
  • Method Details

    • setKeyboardEnabled

      public static void setKeyboardEnabled(boolean keyboardEnabled)
      Disable handling non-permanent controls. Typically used when in a text-box
    • registerPermanentInput

      public static void registerPermanentInput(Input input, ControlsManager.InputType type, ControlsManager.InputAction action)
      Permanently register a new input. These inputs can never be removed or cleared. These inputs always resolve before normal inputs. Any inputs registered for the same input resolve in order of registration.
    • registerInput

      public static void registerInput(Input input, ControlsManager.InputType type, ControlsManager.InputAction action)
      Register a new input. These inputs always resolve after permanent inputs. Any inputs registered for the same input resolve in order of registration.
    • clearRegisteredInputs

      public static void clearRegisteredInputs()
      Clear any registered non-permanent inputs and overrides.
    • pushOverride

      public static void pushOverride(InputOverride override)
    • popOverride

      public static void popOverride(InputOverride override)
    • processInputs

      public static void processInputs()
    • registedMappings

      public static ControlsManager.InputGroupMap registedMappings()
      Get all currently registered key binds
    • matchesInput

      public static Input matchesInput(int code, ControlsManager.InputMethod method, InputModifier... modifiers)
      Check if a keycode, input method, and list of input modifiers corresponds to a known Input. Used with listeners rather than input registration, though is *much* slower and is thus recommended against using when possible. Ignores whether keyboard is enabled or not, along with if inputs for this key have been processed this input cycle.