|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcpw.mods.fml.client.registry.KeyBindingRegistry.KeyHandler
public abstract static class KeyBindingRegistry.KeyHandler
Extend this class to register a KeyBinding and recieve callback when the key binding is triggered
Constructor Summary | |
---|---|
KeyBindingRegistry.KeyHandler(KeyBinding[] keyBindings)
Register the keys into the system. |
|
KeyBindingRegistry.KeyHandler(KeyBinding[] keyBindings,
boolean[] repeatings)
Pass an array of keybindings and a repeat flag for each one |
Method Summary | |
---|---|
KeyBinding[] |
getKeyBindings()
|
abstract void |
keyDown(EnumSet<TickType> types,
KeyBinding kb,
boolean tickEnd,
boolean isRepeat)
Called when the key is first in the down position on any tick from the ticks()
set. |
abstract void |
keyUp(EnumSet<TickType> types,
KeyBinding kb,
boolean tickEnd)
Fired once when the key changes state from down to up |
void |
tickEnd(EnumSet<TickType> type,
Object... tickData)
Not to be overridden - KeyBindings are tickhandlers under the covers |
abstract EnumSet<TickType> |
ticks()
This is the list of ticks for which the key binding should trigger. |
void |
tickStart(EnumSet<TickType> type,
Object... tickData)
Not to be overridden - KeyBindings are tickhandlers under the covers |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface cpw.mods.fml.common.ITickHandler |
---|
getLabel |
Constructor Detail |
---|
public KeyBindingRegistry.KeyHandler(KeyBinding[] keyBindings, boolean[] repeatings)
keyBindings
- repeatings
- public KeyBindingRegistry.KeyHandler(KeyBinding[] keyBindings)
keyBindings
- Method Detail |
---|
public KeyBinding[] getKeyBindings()
public final void tickStart(EnumSet<TickType> type, Object... tickData)
tickStart
in interface ITickHandler
public final void tickEnd(EnumSet<TickType> type, Object... tickData)
tickEnd
in interface ITickHandler
public abstract void keyDown(EnumSet<TickType> types, KeyBinding kb, boolean tickEnd, boolean isRepeat)
ticks()
set. Will be called subsequently with isRepeat set to true
types
- the type(s) of tick that fired when this key was first downtickEnd
- was it an end or start tick which fired the keyisRepeat
- is it a repeat key eventkeyUp(EnumSet, KeyBinding, boolean)
public abstract void keyUp(EnumSet<TickType> types, KeyBinding kb, boolean tickEnd)
types
- the type(s) of tick that fired when this key was first downtickEnd
- was it an end or start tick which fired the keykeyDown(EnumSet, KeyBinding, boolean, boolean)
public abstract EnumSet<TickType> ticks()
ticks
in interface ITickHandler
ITickHandler.ticks()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |