Class InputModule

java.lang.Object
gaiasky.script.v2.impl.APIModule
gaiasky.script.v2.impl.InputModule
All Implemented Interfaces:
IObserver, InputAPI

public class InputModule extends APIModule implements IObserver, InputAPI
The camera module contains methods and calls to access and modify the input system.
  • Constructor Details

    • InputModule

      public InputModule(EventManager em, APIv2 api, String name)
      Create a new module with the given attributes.
      Parameters:
      api - Reference to the API class.
      name - Name of the module.
  • Method Details

    • disable

      public void disable()
      Description copied from interface: InputAPI
      Disable all input events in Gaia Sky (mouse, keyboard, touchscreen, and gamepad) until a call to InputAPI.enable() is issued.

      After this method is called, Gaia Sky will not respond to any kind of input event.

      Specified by:
      disable in interface InputAPI
    • enable

      public void enable()
      Description copied from interface: InputAPI
      Enable all input events in Gaia Sky (mouse, keyboard, touchscreen, and gamepad). This call re-enables all input events, which were possibly disabled with InputAPI.disable().
      Specified by:
      enable in interface InputAPI
    • wait_input

      public void wait_input()
      Description copied from interface: InputAPI
      Block the execution until any kind of input (keyboard, mouse, etc.) is received.
      Specified by:
      wait_input in interface InputAPI
    • wait_enter

      public void wait_enter()
      Description copied from interface: InputAPI
      Block the execution until the Enter key is pressed.
      Specified by:
      wait_enter in interface InputAPI
    • wait_input

      public void wait_input(int code)
      Description copied from interface: InputAPI
      Block the execution until the given key or button is pressed.
      Specified by:
      wait_input in interface InputAPI
      Parameters:
      code - The key or button code. Please see Input.Keys and GSKeys.
    • notify

      public void notify(Event event, Object source, Object... data)
      Description copied from interface: IObserver
      Event notification call.
      Specified by:
      notify in interface IObserver
      Parameters:
      event - The event type.
      source - The source object, if any.
      data - The data associated with this event.