Package zombie.core.input
Class Input
java.lang.Object
zombie.core.input.Input
public class Input
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description protected java.util.HashSet
allListeners
static int
ANY_CONTROLLER
protected boolean
consumed
protected java.util.ArrayList
controllerListeners
static int
KEY_0
static int
KEY_1
static int
KEY_2
static int
KEY_3
static int
KEY_4
static int
KEY_5
static int
KEY_6
static int
KEY_7
static int
KEY_8
static int
KEY_9
static int
KEY_A
static int
KEY_ADD
static int
KEY_APOSTROPHE
static int
KEY_APPS
static int
KEY_AT
static int
KEY_AX
static int
KEY_B
static int
KEY_BACK
static int
KEY_BACKSLASH
static int
KEY_C
static int
KEY_CAPITAL
static int
KEY_CIRCUMFLEX
static int
KEY_COLON
static int
KEY_COMMA
static int
KEY_CONVERT
static int
KEY_D
static int
KEY_DECIMAL
static int
KEY_DELETE
static int
KEY_DIVIDE
static int
KEY_DOWN
static int
KEY_E
static int
KEY_END
static int
KEY_ENTER
static int
KEY_EQUALS
static int
KEY_ESCAPE
static int
KEY_F
static int
KEY_F1
static int
KEY_F10
static int
KEY_F11
static int
KEY_F12
static int
KEY_F13
static int
KEY_F14
static int
KEY_F15
static int
KEY_F2
static int
KEY_F3
static int
KEY_F4
static int
KEY_F5
static int
KEY_F6
static int
KEY_F7
static int
KEY_F8
static int
KEY_F9
static int
KEY_G
static int
KEY_GRAVE
static int
KEY_H
static int
KEY_HOME
static int
KEY_I
static int
KEY_INSERT
static int
KEY_J
static int
KEY_K
static int
KEY_KANA
static int
KEY_KANJI
static int
KEY_L
static int
KEY_LALT
static int
KEY_LBRACKET
static int
KEY_LCONTROL
static int
KEY_LEFT
static int
KEY_LMENU
static int
KEY_LSHIFT
static int
KEY_LWIN
static int
KEY_M
static int
KEY_MINUS
static int
KEY_MULTIPLY
static int
KEY_N
static int
KEY_NEXT
static int
KEY_NOCONVERT
static int
KEY_NUMLOCK
static int
KEY_NUMPAD0
static int
KEY_NUMPAD1
static int
KEY_NUMPAD2
static int
KEY_NUMPAD3
static int
KEY_NUMPAD4
static int
KEY_NUMPAD5
static int
KEY_NUMPAD6
static int
KEY_NUMPAD7
static int
KEY_NUMPAD8
static int
KEY_NUMPAD9
static int
KEY_NUMPADCOMMA
static int
KEY_NUMPADENTER
static int
KEY_NUMPADEQUALS
static int
KEY_O
static int
KEY_P
static int
KEY_PAUSE
static int
KEY_PERIOD
static int
KEY_POWER
static int
KEY_PRIOR
static int
KEY_Q
static int
KEY_R
static int
KEY_RALT
static int
KEY_RBRACKET
static int
KEY_RCONTROL
static int
KEY_RETURN
static int
KEY_RIGHT
static int
KEY_RMENU
static int
KEY_RSHIFT
static int
KEY_RWIN
static int
KEY_S
static int
KEY_SCROLL
static int
KEY_SEMICOLON
static int
KEY_SLASH
static int
KEY_SLEEP
static int
KEY_SPACE
static int
KEY_STOP
static int
KEY_SUBTRACT
static int
KEY_SYSRQ
static int
KEY_T
static int
KEY_TAB
static int
KEY_U
static int
KEY_UNDERLINE
static int
KEY_UNLABELED
static int
KEY_UP
static int
KEY_V
static int
KEY_W
static int
KEY_X
static int
KEY_Y
static int
KEY_YEN
static int
KEY_Z
protected java.util.ArrayList
keyListeners
protected java.util.ArrayList
keyListenersToAdd
protected char[]
keys
static int
MAX_CONTROLLERS
static int
MOUSE_LEFT_BUTTON
static int
MOUSE_MIDDLE_BUTTON
static int
MOUSE_RIGHT_BUTTON
protected java.util.ArrayList
mouseListeners
protected java.util.ArrayList
mouseListenersToAdd
protected boolean[]
mousePressed
protected long[]
nextRepeat
protected boolean[]
pressed
boolean[]
presseda
-
Constructor Summary
Constructors Constructor Description Input(int int1)
-
Method Summary
Modifier and Type Method Description void
addControllerListener(ControllerListener controllerListener)
void
addKeyListener(KeyListener keyListener)
void
addListener(InputListener inputListener)
void
addMouseListener(MouseListener mouseListener)
void
addPrimaryListener(InputListener inputListener)
void
clearControlPressedRecord()
void
clearKeyPressedRecord()
void
clearMousePressedRecord()
void
considerDoubleClick(int int1, int int2, int int3)
void
consumeEvent()
static void
disableControllers()
void
disableKeyRepeat()
void
enableKeyRepeat()
void
enableKeyRepeat(int int1, int int2)
int
getAbsoluteMouseX()
int
getAbsoluteMouseY()
int
getAxisCount(int int1)
java.lang.String
getAxisName(int int1, int int2)
float
getAxisValue(int int1, int int2)
int
getButtonCount(int int1)
java.lang.String
getButtonName(int int1, int int2)
org.lwjgl.input.Controller
getController(int int1)
int
getControllerCount()
static java.lang.String
getKeyName(int int1)
int
getMouseX()
int
getMouseY()
void
initControllers()
boolean
isButton1Pressed(int int1)
boolean
isButton2Pressed(int int1)
boolean
isButton3Pressed(int int1)
boolean
isButtonPressed(int int1, int int2)
boolean
isButtonPressedD(int int1, int int2)
boolean
isControllerDown(int int1)
boolean
isControllerDownD(int int1)
boolean
isControllerLeft(int int1)
boolean
isControllerLeftD(int int1)
boolean
isControllerRight(int int1)
boolean
isControllerRightD(int int1)
boolean
isControllerUp(int int1)
boolean
isControllerUpD(int int1)
boolean
isControlPressed(int int1)
boolean
isControlPressed(int int1, int int2)
boolean
isKeyDown(int int1)
boolean
isKeyPressed(int int1)
boolean
isKeyRepeatEnabled()
boolean
isMouseButtonDown(int int1)
boolean
isMousePressed(int int1)
void
pause()
void
poll(int int1, int int2)
void
removeAllControllerListeners()
void
removeAllKeyListeners()
void
removeAllListeners()
void
removeAllMouseListeners()
void
removeControllerListener(ControllerListener controllerListener)
void
removeKeyListener(KeyListener keyListener)
void
removeListener(InputListener inputListener)
void
removeMouseListener(MouseListener mouseListener)
void
resetInputTransform()
void
resume()
void
setDoubleClickInterval(int int1)
void
setMouseClickTolerance(int int1)
void
setOffset(float float1, float float2)
void
setScale(float float1, float float2)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
ANY_CONTROLLER
public static final int ANY_CONTROLLER- See Also:
- Constant Field Values
-
MAX_CONTROLLERS
public static final int MAX_CONTROLLERS- See Also:
- Constant Field Values
-
KEY_ESCAPE
public static final int KEY_ESCAPE- See Also:
- Constant Field Values
-
KEY_1
public static final int KEY_1- See Also:
- Constant Field Values
-
KEY_2
public static final int KEY_2- See Also:
- Constant Field Values
-
KEY_3
public static final int KEY_3- See Also:
- Constant Field Values
-
KEY_4
public static final int KEY_4- See Also:
- Constant Field Values
-
KEY_5
public static final int KEY_5- See Also:
- Constant Field Values
-
KEY_6
public static final int KEY_6- See Also:
- Constant Field Values
-
KEY_7
public static final int KEY_7- See Also:
- Constant Field Values
-
KEY_8
public static final int KEY_8- See Also:
- Constant Field Values
-
KEY_9
public static final int KEY_9- See Also:
- Constant Field Values
-
KEY_0
public static final int KEY_0- See Also:
- Constant Field Values
-
KEY_MINUS
public static final int KEY_MINUS- See Also:
- Constant Field Values
-
KEY_EQUALS
public static final int KEY_EQUALS- See Also:
- Constant Field Values
-
KEY_BACK
public static final int KEY_BACK- See Also:
- Constant Field Values
-
KEY_TAB
public static final int KEY_TAB- See Also:
- Constant Field Values
-
KEY_Q
public static final int KEY_Q- See Also:
- Constant Field Values
-
KEY_W
public static final int KEY_W- See Also:
- Constant Field Values
-
KEY_E
public static final int KEY_E- See Also:
- Constant Field Values
-
KEY_R
public static final int KEY_R- See Also:
- Constant Field Values
-
KEY_T
public static final int KEY_T- See Also:
- Constant Field Values
-
KEY_Y
public static final int KEY_Y- See Also:
- Constant Field Values
-
KEY_U
public static final int KEY_U- See Also:
- Constant Field Values
-
KEY_I
public static final int KEY_I- See Also:
- Constant Field Values
-
KEY_O
public static final int KEY_O- See Also:
- Constant Field Values
-
KEY_P
public static final int KEY_P- See Also:
- Constant Field Values
-
KEY_LBRACKET
public static final int KEY_LBRACKET- See Also:
- Constant Field Values
-
KEY_RBRACKET
public static final int KEY_RBRACKET- See Also:
- Constant Field Values
-
KEY_RETURN
public static final int KEY_RETURN- See Also:
- Constant Field Values
-
KEY_ENTER
public static final int KEY_ENTER- See Also:
- Constant Field Values
-
KEY_LCONTROL
public static final int KEY_LCONTROL- See Also:
- Constant Field Values
-
KEY_A
public static final int KEY_A- See Also:
- Constant Field Values
-
KEY_S
public static final int KEY_S- See Also:
- Constant Field Values
-
KEY_D
public static final int KEY_D- See Also:
- Constant Field Values
-
KEY_F
public static final int KEY_F- See Also:
- Constant Field Values
-
KEY_G
public static final int KEY_G- See Also:
- Constant Field Values
-
KEY_H
public static final int KEY_H- See Also:
- Constant Field Values
-
KEY_J
public static final int KEY_J- See Also:
- Constant Field Values
-
KEY_K
public static final int KEY_K- See Also:
- Constant Field Values
-
KEY_L
public static final int KEY_L- See Also:
- Constant Field Values
-
KEY_SEMICOLON
public static final int KEY_SEMICOLON- See Also:
- Constant Field Values
-
KEY_APOSTROPHE
public static final int KEY_APOSTROPHE- See Also:
- Constant Field Values
-
KEY_GRAVE
public static final int KEY_GRAVE- See Also:
- Constant Field Values
-
KEY_LSHIFT
public static final int KEY_LSHIFT- See Also:
- Constant Field Values
-
KEY_BACKSLASH
public static final int KEY_BACKSLASH- See Also:
- Constant Field Values
-
KEY_Z
public static final int KEY_Z- See Also:
- Constant Field Values
-
KEY_X
public static final int KEY_X- See Also:
- Constant Field Values
-
KEY_C
public static final int KEY_C- See Also:
- Constant Field Values
-
KEY_V
public static final int KEY_V- See Also:
- Constant Field Values
-
KEY_B
public static final int KEY_B- See Also:
- Constant Field Values
-
KEY_N
public static final int KEY_N- See Also:
- Constant Field Values
-
KEY_M
public static final int KEY_M- See Also:
- Constant Field Values
-
KEY_COMMA
public static final int KEY_COMMA- See Also:
- Constant Field Values
-
KEY_PERIOD
public static final int KEY_PERIOD- See Also:
- Constant Field Values
-
KEY_SLASH
public static final int KEY_SLASH- See Also:
- Constant Field Values
-
KEY_RSHIFT
public static final int KEY_RSHIFT- See Also:
- Constant Field Values
-
KEY_MULTIPLY
public static final int KEY_MULTIPLY- See Also:
- Constant Field Values
-
KEY_LMENU
public static final int KEY_LMENU- See Also:
- Constant Field Values
-
KEY_SPACE
public static final int KEY_SPACE- See Also:
- Constant Field Values
-
KEY_CAPITAL
public static final int KEY_CAPITAL- See Also:
- Constant Field Values
-
KEY_F1
public static final int KEY_F1- See Also:
- Constant Field Values
-
KEY_F2
public static final int KEY_F2- See Also:
- Constant Field Values
-
KEY_F3
public static final int KEY_F3- See Also:
- Constant Field Values
-
KEY_F4
public static final int KEY_F4- See Also:
- Constant Field Values
-
KEY_F5
public static final int KEY_F5- See Also:
- Constant Field Values
-
KEY_F6
public static final int KEY_F6- See Also:
- Constant Field Values
-
KEY_F7
public static final int KEY_F7- See Also:
- Constant Field Values
-
KEY_F8
public static final int KEY_F8- See Also:
- Constant Field Values
-
KEY_F9
public static final int KEY_F9- See Also:
- Constant Field Values
-
KEY_F10
public static final int KEY_F10- See Also:
- Constant Field Values
-
KEY_NUMLOCK
public static final int KEY_NUMLOCK- See Also:
- Constant Field Values
-
KEY_SCROLL
public static final int KEY_SCROLL- See Also:
- Constant Field Values
-
KEY_NUMPAD7
public static final int KEY_NUMPAD7- See Also:
- Constant Field Values
-
KEY_NUMPAD8
public static final int KEY_NUMPAD8- See Also:
- Constant Field Values
-
KEY_NUMPAD9
public static final int KEY_NUMPAD9- See Also:
- Constant Field Values
-
KEY_SUBTRACT
public static final int KEY_SUBTRACT- See Also:
- Constant Field Values
-
KEY_NUMPAD4
public static final int KEY_NUMPAD4- See Also:
- Constant Field Values
-
KEY_NUMPAD5
public static final int KEY_NUMPAD5- See Also:
- Constant Field Values
-
KEY_NUMPAD6
public static final int KEY_NUMPAD6- See Also:
- Constant Field Values
-
KEY_ADD
public static final int KEY_ADD- See Also:
- Constant Field Values
-
KEY_NUMPAD1
public static final int KEY_NUMPAD1- See Also:
- Constant Field Values
-
KEY_NUMPAD2
public static final int KEY_NUMPAD2- See Also:
- Constant Field Values
-
KEY_NUMPAD3
public static final int KEY_NUMPAD3- See Also:
- Constant Field Values
-
KEY_NUMPAD0
public static final int KEY_NUMPAD0- See Also:
- Constant Field Values
-
KEY_DECIMAL
public static final int KEY_DECIMAL- See Also:
- Constant Field Values
-
KEY_F11
public static final int KEY_F11- See Also:
- Constant Field Values
-
KEY_F12
public static final int KEY_F12- See Also:
- Constant Field Values
-
KEY_F13
public static final int KEY_F13- See Also:
- Constant Field Values
-
KEY_F14
public static final int KEY_F14- See Also:
- Constant Field Values
-
KEY_F15
public static final int KEY_F15- See Also:
- Constant Field Values
-
KEY_KANA
public static final int KEY_KANA- See Also:
- Constant Field Values
-
KEY_CONVERT
public static final int KEY_CONVERT- See Also:
- Constant Field Values
-
KEY_NOCONVERT
public static final int KEY_NOCONVERT- See Also:
- Constant Field Values
-
KEY_YEN
public static final int KEY_YEN- See Also:
- Constant Field Values
-
KEY_NUMPADEQUALS
public static final int KEY_NUMPADEQUALS- See Also:
- Constant Field Values
-
KEY_CIRCUMFLEX
public static final int KEY_CIRCUMFLEX- See Also:
- Constant Field Values
-
KEY_AT
public static final int KEY_AT- See Also:
- Constant Field Values
-
KEY_COLON
public static final int KEY_COLON- See Also:
- Constant Field Values
-
KEY_UNDERLINE
public static final int KEY_UNDERLINE- See Also:
- Constant Field Values
-
KEY_KANJI
public static final int KEY_KANJI- See Also:
- Constant Field Values
-
KEY_STOP
public static final int KEY_STOP- See Also:
- Constant Field Values
-
KEY_AX
public static final int KEY_AX- See Also:
- Constant Field Values
-
KEY_UNLABELED
public static final int KEY_UNLABELED- See Also:
- Constant Field Values
-
KEY_NUMPADENTER
public static final int KEY_NUMPADENTER- See Also:
- Constant Field Values
-
KEY_RCONTROL
public static final int KEY_RCONTROL- See Also:
- Constant Field Values
-
KEY_NUMPADCOMMA
public static final int KEY_NUMPADCOMMA- See Also:
- Constant Field Values
-
KEY_DIVIDE
public static final int KEY_DIVIDE- See Also:
- Constant Field Values
-
KEY_SYSRQ
public static final int KEY_SYSRQ- See Also:
- Constant Field Values
-
KEY_RMENU
public static final int KEY_RMENU- See Also:
- Constant Field Values
-
KEY_PAUSE
public static final int KEY_PAUSE- See Also:
- Constant Field Values
-
KEY_HOME
public static final int KEY_HOME- See Also:
- Constant Field Values
-
KEY_UP
public static final int KEY_UP- See Also:
- Constant Field Values
-
KEY_PRIOR
public static final int KEY_PRIOR- See Also:
- Constant Field Values
-
KEY_LEFT
public static final int KEY_LEFT- See Also:
- Constant Field Values
-
KEY_RIGHT
public static final int KEY_RIGHT- See Also:
- Constant Field Values
-
KEY_END
public static final int KEY_END- See Also:
- Constant Field Values
-
KEY_DOWN
public static final int KEY_DOWN- See Also:
- Constant Field Values
-
KEY_NEXT
public static final int KEY_NEXT- See Also:
- Constant Field Values
-
KEY_INSERT
public static final int KEY_INSERT- See Also:
- Constant Field Values
-
KEY_DELETE
public static final int KEY_DELETE- See Also:
- Constant Field Values
-
KEY_LWIN
public static final int KEY_LWIN- See Also:
- Constant Field Values
-
KEY_RWIN
public static final int KEY_RWIN- See Also:
- Constant Field Values
-
KEY_APPS
public static final int KEY_APPS- See Also:
- Constant Field Values
-
KEY_POWER
public static final int KEY_POWER- See Also:
- Constant Field Values
-
KEY_SLEEP
public static final int KEY_SLEEP- See Also:
- Constant Field Values
-
KEY_LALT
public static final int KEY_LALT- See Also:
- Constant Field Values
-
KEY_RALT
public static final int KEY_RALT- See Also:
- Constant Field Values
-
MOUSE_LEFT_BUTTON
public static final int MOUSE_LEFT_BUTTON- See Also:
- Constant Field Values
-
MOUSE_RIGHT_BUTTON
public static final int MOUSE_RIGHT_BUTTON- See Also:
- Constant Field Values
-
MOUSE_MIDDLE_BUTTON
public static final int MOUSE_MIDDLE_BUTTON- See Also:
- Constant Field Values
-
mousePressed
protected boolean[] mousePressed -
keys
protected char[] keys -
pressed
protected boolean[] pressed -
nextRepeat
protected long[] nextRepeat -
consumed
protected boolean consumed -
allListeners
protected java.util.HashSet allListeners -
keyListeners
protected java.util.ArrayList keyListeners -
keyListenersToAdd
protected java.util.ArrayList keyListenersToAdd -
mouseListeners
protected java.util.ArrayList mouseListeners -
mouseListenersToAdd
protected java.util.ArrayList mouseListenersToAdd -
controllerListeners
protected java.util.ArrayList controllerListeners -
presseda
public boolean[] presseda
-
-
Constructor Details
-
Input
public Input(int int1)
-
-
Method Details
-
disableControllers
public static void disableControllers() -
setDoubleClickInterval
public void setDoubleClickInterval(int int1) -
setMouseClickTolerance
public void setMouseClickTolerance(int int1) -
setScale
public void setScale(float float1, float float2) -
setOffset
public void setOffset(float float1, float float2) -
resetInputTransform
public void resetInputTransform() -
addListener
-
addKeyListener
-
addMouseListener
-
addControllerListener
-
removeAllListeners
public void removeAllListeners() -
removeAllKeyListeners
public void removeAllKeyListeners() -
removeAllMouseListeners
public void removeAllMouseListeners() -
removeAllControllerListeners
public void removeAllControllerListeners() -
addPrimaryListener
-
removeListener
-
removeKeyListener
-
removeControllerListener
-
removeMouseListener
-
getKeyName
public static java.lang.String getKeyName(int int1) -
isKeyPressed
public boolean isKeyPressed(int int1) -
isMousePressed
public boolean isMousePressed(int int1) -
isControlPressed
public boolean isControlPressed(int int1) -
isControlPressed
public boolean isControlPressed(int int1, int int2) -
clearControlPressedRecord
public void clearControlPressedRecord() -
clearKeyPressedRecord
public void clearKeyPressedRecord() -
clearMousePressedRecord
public void clearMousePressedRecord() -
isKeyDown
public boolean isKeyDown(int int1) -
getAbsoluteMouseX
public int getAbsoluteMouseX() -
getAbsoluteMouseY
public int getAbsoluteMouseY() -
getMouseX
public int getMouseX() -
getMouseY
public int getMouseY() -
isMouseButtonDown
public boolean isMouseButtonDown(int int1) -
getControllerCount
public int getControllerCount() -
getAxisCount
public int getAxisCount(int int1) -
getAxisValue
public float getAxisValue(int int1, int int2) -
getAxisName
public java.lang.String getAxisName(int int1, int int2) -
isControllerLeft
public boolean isControllerLeft(int int1) -
isControllerLeftD
public boolean isControllerLeftD(int int1) -
isControllerRight
public boolean isControllerRight(int int1) -
isControllerRightD
public boolean isControllerRightD(int int1) -
isControllerUp
public boolean isControllerUp(int int1) -
isControllerUpD
public boolean isControllerUpD(int int1) -
isControllerDown
public boolean isControllerDown(int int1) -
isControllerDownD
public boolean isControllerDownD(int int1) -
isButtonPressed
public boolean isButtonPressed(int int1, int int2) -
isButtonPressedD
public boolean isButtonPressedD(int int1, int int2) -
isButton1Pressed
public boolean isButton1Pressed(int int1) -
isButton2Pressed
public boolean isButton2Pressed(int int1) -
isButton3Pressed
public boolean isButton3Pressed(int int1) -
initControllers
public void initControllers() -
consumeEvent
public void consumeEvent() -
considerDoubleClick
public void considerDoubleClick(int int1, int int2, int int3) -
poll
public void poll(int int1, int int2) -
enableKeyRepeat
public void enableKeyRepeat(int int1, int int2) -
enableKeyRepeat
public void enableKeyRepeat() -
disableKeyRepeat
public void disableKeyRepeat() -
isKeyRepeatEnabled
public boolean isKeyRepeatEnabled() -
pause
public void pause() -
resume
public void resume() -
getController
public org.lwjgl.input.Controller getController(int int1) -
getButtonCount
public int getButtonCount(int int1) -
getButtonName
public java.lang.String getButtonName(int int1, int int2)
-