Package gaiasky.interafce
Class KeyBindings
java.lang.Object
gaiasky.interafce.KeyBindings
public class KeyBindings
extends java.lang.Object
Contains the key mappings and the actions. This should be persisted somehow
in the future.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
KeyBindings.BooleanRunnable
class
KeyBindings.ProgramAction
A simple program action. -
Field Summary
-
Method Summary
Modifier and Type Method Description KeyBindings.ProgramAction
findAction(java.lang.String name)
Finds an action given its namejava.util.TreeSet<java.lang.Integer>
getKeys(java.lang.String actionId)
Gets the keys that trigger the action identified by the given namejava.util.Map<java.util.TreeSet<java.lang.Integer>,KeyBindings.ProgramAction>
getMappings()
java.util.Map<KeyBindings.ProgramAction,com.badlogic.gdx.utils.Array<java.util.TreeSet<java.lang.Integer>>>
getMappingsInv()
java.util.Map<java.util.TreeSet<java.lang.Integer>,KeyBindings.ProgramAction>
getSortedMappings()
java.util.Map<KeyBindings.ProgramAction,com.badlogic.gdx.utils.Array<java.util.TreeSet<java.lang.Integer>>>
getSortedMappingsInv()
java.lang.String
getStringKeys(java.lang.String actionId)
static void
initialize()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
instance
-
CTRL_L
public static final int CTRL_L- See Also:
- Constant Field Values
-
SHIFT_L
public static final int SHIFT_L- See Also:
- Constant Field Values
-
ALT_L
public static final int ALT_L- See Also:
- Constant Field Values
-
SPECIAL
public static final int[] SPECIAL
-
-
Method Details
-
initialize
public static void initialize() -
getMappings
-
getMappingsInv
public java.util.Map<KeyBindings.ProgramAction,com.badlogic.gdx.utils.Array<java.util.TreeSet<java.lang.Integer>>> getMappingsInv() -
getSortedMappings
public java.util.Map<java.util.TreeSet<java.lang.Integer>,KeyBindings.ProgramAction> getSortedMappings() -
getSortedMappingsInv
public java.util.Map<KeyBindings.ProgramAction,com.badlogic.gdx.utils.Array<java.util.TreeSet<java.lang.Integer>>> getSortedMappingsInv() -
findAction
Finds an action given its name- Parameters:
name
- The name- Returns:
- The action if it exists
-
getKeys
public java.util.TreeSet<java.lang.Integer> getKeys(java.lang.String actionId)Gets the keys that trigger the action identified by the given name- Parameters:
actionId
- The action ID- Returns:
- The keys
-
getStringKeys
public java.lang.String getStringKeys(java.lang.String actionId)
-