InputHandler

public class InputHandler(source)

The InputHandler is responsible for handling input events of the GuiPanel.

Constructors

Link copied to clipboard
public void InputHandler(GuiPanel panel)
Creates a new GameInputHandler.

Properties

Link copied to clipboard
public final Set<Integer> keysPressed
The keys that were pressed during the last frame.

Functions

Link copied to clipboard
public void addFieldClickListener(FieldClickListener screenListener)
Adds the screen listener to this input handler.
Link copied to clipboard
public void addKeyListener(KeyListener eventHandler)
Adds the given event handler to the listeners list.
Link copied to clipboard
public void addKeyPressListener(KeyPressListener listener)
Adds the given key press listener to this input handler.
Link copied to clipboard
public static InputHandler getInputHandler()
Returns the input handler of the global world.
Link copied to clipboard
Gets the value of keysPressed field.