DEADSOFTWARE

Add tooltips
[cavedroid.git] / core / src / ru / deadsoftware / cavedroid / game / input / mapper / KeyboardInputActionMapper.kt
index ca91f486951fdf0b737ede5f84d8fbd3e92df3dd..8d18d070703931aeafdb4a41867d66e7c4b2cc35 100644 (file)
@@ -13,7 +13,7 @@ class KeyboardInputActionMapper @Inject constructor() {
         val actionKey = when (key) {
             Input.Keys.A, Input.Keys.LEFT -> KeyboardInputActionKey.Left
             Input.Keys.D, Input.Keys.RIGHT -> KeyboardInputActionKey.Right
-            Input.Keys.W, Input.Keys.SPACE -> KeyboardInputActionKey.Jump
+            Input.Keys.W, Input.Keys.SPACE -> KeyboardInputActionKey.Up
             Input.Keys.S -> KeyboardInputActionKey.Down
 
             Input.Keys.E -> KeyboardInputActionKey.OpenInventory
@@ -25,7 +25,17 @@ class KeyboardInputActionMapper @Inject constructor() {
             Input.Keys.GRAVE -> KeyboardInputActionKey.SwitchGameMode
             Input.Keys.M -> KeyboardInputActionKey.ShowMap
 
-            Input.Keys.T -> KeyboardInputActionKey.OpenCraft
+            Input.Keys.Q -> KeyboardInputActionKey.DropItem
+
+            Input.Keys.NUM_1 -> KeyboardInputActionKey.SelectHotbarSlot(0)
+            Input.Keys.NUM_2 -> KeyboardInputActionKey.SelectHotbarSlot(1)
+            Input.Keys.NUM_3 -> KeyboardInputActionKey.SelectHotbarSlot(2)
+            Input.Keys.NUM_4 -> KeyboardInputActionKey.SelectHotbarSlot(3)
+            Input.Keys.NUM_5 -> KeyboardInputActionKey.SelectHotbarSlot(4)
+            Input.Keys.NUM_6 -> KeyboardInputActionKey.SelectHotbarSlot(5)
+            Input.Keys.NUM_7 -> KeyboardInputActionKey.SelectHotbarSlot(6)
+            Input.Keys.NUM_8 -> KeyboardInputActionKey.SelectHotbarSlot(7)
+            Input.Keys.NUM_9 -> KeyboardInputActionKey.SelectHotbarSlot(8)
 
             else -> null
         }