Package arc
Class KeyBinds
java.lang.Object
arc.KeyBinds
Stores keybinds.
This is done by first splitting keybinds into separate sections by name. Further, the keybinds are split by device type (keyboard, controller), and then by name.
Example hierarchy:
Section (default) Device (keyboard) jump = KeyCode.space move = Axis(KeyCode.left, KeyCode.right) Device (controller) jump = KeyCode.controllera move = Axis(CONTROLLER_L_STICK_HORIZONTAL_AXIS)
Section (player2) ...etc
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static interface
An interface to store type-safe keybind definitions.static interface
Represents an axis or a KeyCode.static class
A section represents a set of input binds, like controls for a specific player. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionget
(KeyBinds.KeyBind name) get
(KeyBinds.Section section, InputDevice.DeviceType type, KeyBinds.KeyBind def) get
(KeyBinds.Section section, KeyBinds.KeyBind def) void
resetToDefault
(KeyBinds.Section section, KeyBinds.KeyBind bind) Resets a keybind to its default value.void
Resets all keybinds to their default values.void
setDefaults
(KeyBinds.KeyBind[] defs, KeyBinds.Section... sectionArr)
-
Constructor Details
-
KeyBinds
public KeyBinds()
-
-
Method Details
-
setDefaults
-
resetToDefaults
public void resetToDefaults()Resets all keybinds to their default values. -
resetToDefault
Resets a keybind to its default value. Call Core.settings.save() to flush the change afterwards. -
getSections
-
getKeybinds
-
get
-
get
-
get
public KeyBinds.Axis get(KeyBinds.Section section, InputDevice.DeviceType type, KeyBinds.KeyBind def)
-