Package gaia.cu9.ari.gaiaorbit.interfce
Class KeyBindings
- java.lang.Object
-
- gaia.cu9.ari.gaiaorbit.interfce.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
Fields Modifier and Type Field Description static int
ALT_L
ALTstatic int
CTRL_L
CONTROLstatic KeyBindings
instance
static int
SHIFT_L
SHIFT
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods 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()
-
-
-
Field Detail
-
instance
public static KeyBindings instance
-
CTRL_L
public static int CTRL_L
CONTROL
-
SHIFT_L
public static int SHIFT_L
SHIFT
-
ALT_L
public static int ALT_L
ALT
-
-
Method Detail
-
initialize
public static void initialize()
-
getMappings
public java.util.Map<java.util.TreeSet<java.lang.Integer>,KeyBindings.ProgramAction> 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
public KeyBindings.ProgramAction findAction(java.lang.String name)
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)
-
-