v0.8.0: added all other key actions from old desktop build, no remapping yet

This commit is contained in:
Evan Debenham
2019-10-30 15:49:09 -04:00
parent 1539d57f71
commit 0696bf1f36
12 changed files with 196 additions and 33 deletions

View File

@@ -21,11 +21,32 @@
package com.watabou.input;
//FIXME this is describing actions defined in the core module, it should probably be moved there.
public enum KeyAction {
BACK,
MENU,
N, NE, E, SE, S, SW, W, NW,
HERO_INFO,
JOURNAL,
UNKNOWN
WAIT,
SEARCH,
INVENTORY,
QUICKSLOT_1,
QUICKSLOT_2,
QUICKSLOT_3,
QUICKSLOT_4,
TAG_ATTACK,
TAG_DANGER,
TAG_ACTION,
TAG_LOOT,
TAG_RESUME,
ZOOM_IN,
ZOOM_OUT,
ZOOM_DEFAULT,
N, NE, E, SE, S, SW, W, NW
}

View File

@@ -32,14 +32,37 @@ public class KeyBindings {
static {
bindings = new HashMap<>();
bindings.put( Input.Keys.BACK, KeyAction.BACK );
bindings.put( Input.Keys.MENU, KeyAction.MENU );
bindings.put( Input.Keys.BACK, KeyAction.BACK );
bindings.put( Input.Keys.MENU, KeyAction.MENU );
bindings.put( Input.Keys.H, KeyAction.HERO_INFO );
bindings.put( Input.Keys.J, KeyAction.JOURNAL );
bindings.put( Input.Keys.NUMPAD_5, KeyAction.WAIT );
bindings.put( Input.Keys.SPACE, KeyAction.WAIT );
bindings.put( Input.Keys.S, KeyAction.SEARCH );
bindings.put( Input.Keys.I, KeyAction.INVENTORY );
bindings.put( Input.Keys.Q, KeyAction.QUICKSLOT_1 );
bindings.put( Input.Keys.W, KeyAction.QUICKSLOT_2 );
bindings.put( Input.Keys.E, KeyAction.QUICKSLOT_3 );
bindings.put( Input.Keys.R, KeyAction.QUICKSLOT_4 );
bindings.put( Input.Keys.A, KeyAction.TAG_ATTACK );
bindings.put( Input.Keys.TAB, KeyAction.TAG_DANGER );
bindings.put( Input.Keys.D, KeyAction.TAG_ACTION );
bindings.put( Input.Keys.ENTER, KeyAction.TAG_LOOT );
bindings.put( Input.Keys.T, KeyAction.TAG_RESUME );
bindings.put( Input.Keys.PLUS, KeyAction.ZOOM_IN );
bindings.put( Input.Keys.EQUALS, KeyAction.ZOOM_IN );
bindings.put( Input.Keys.MINUS, KeyAction.ZOOM_OUT );
bindings.put( Input.Keys.SLASH, KeyAction.ZOOM_DEFAULT );
bindings.put( Input.Keys.UP, KeyAction.N );
bindings.put( Input.Keys.RIGHT, KeyAction.E );
bindings.put( Input.Keys.DOWN, KeyAction.S );
bindings.put( Input.Keys.LEFT, KeyAction.W );
bindings.put( Input.Keys.NUMPAD_8, KeyAction.N );
bindings.put( Input.Keys.NUMPAD_9, KeyAction.NE );
bindings.put( Input.Keys.NUMPAD_6, KeyAction.E );