net.ctdp.rfdynhud.input
Class InputMappingsManager

java.lang.Object
  extended by net.ctdp.rfdynhud.input.InputMappingsManager

public class InputMappingsManager
extends java.lang.Object

This manager manages mappings of InputActions to input device components (buttons and keys).

Author:
Marvin Froehlich (CTDP)

Field Summary
static java.lang.String CONFIG_FILE_NAME
           
 
Constructor Summary
InputMappingsManager(RFDynHUD rfDynHUD)
           
 
Method Summary
 java.nio.ByteBuffer getBuffer()
           
static java.lang.String getComponentNameForTable(InputMapping mapping)
           
 boolean isPluginEnabled()
           
 InputMappings loadMappings(InputDeviceManager devManager)
           
static java.lang.Object[] parseMapping(int lineNr, java.lang.String key, java.lang.String value, InputDeviceManager devManager)
           
static java.lang.String unparseModifierMask(int modifierMask)
           
 int update(GameEventsManager eventsManager, WidgetsDrawingManager widgetsManager, LiveGameData gameData, boolean isEditorMode, int modifierMask)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIG_FILE_NAME

public static final java.lang.String CONFIG_FILE_NAME
See Also:
Constant Field Values
Constructor Detail

InputMappingsManager

public InputMappingsManager(RFDynHUD rfDynHUD)
Method Detail

getBuffer

public final java.nio.ByteBuffer getBuffer()

isPluginEnabled

public final boolean isPluginEnabled()

unparseModifierMask

public static java.lang.String unparseModifierMask(int modifierMask)

getComponentNameForTable

public static java.lang.String getComponentNameForTable(InputMapping mapping)

parseMapping

public static java.lang.Object[] parseMapping(int lineNr,
                                              java.lang.String key,
                                              java.lang.String value,
                                              InputDeviceManager devManager)

loadMappings

public InputMappings loadMappings(InputDeviceManager devManager)

update

public int update(GameEventsManager eventsManager,
                  WidgetsDrawingManager widgetsManager,
                  LiveGameData gameData,
                  boolean isEditorMode,
                  int modifierMask)
Parameters:
eventsManager -
widgetsManager - the manager to fire widget events on
gameData - the live game data
isEditorMode - editor mode? (certainly false)
modifierMask - the key modifier mask
Returns:
-1 if plugin got disabled, 0 if plugin was and is disabled, 1 if plugin was and is enabled., 2 if plugin got enabled.