v1.2.1: added support for binding mouse 4 and 5 to game actions
This commit is contained in:
@@ -50,7 +50,7 @@ public class KeyBindings {
|
||||
public static boolean bindingKey = false;
|
||||
|
||||
public static boolean isKeyBound(int keyCode){
|
||||
if (keyCode <= 0 || keyCode > 255){
|
||||
if (keyCode < 0 || (keyCode > 255 && keyCode < 1000)){
|
||||
return false;
|
||||
}
|
||||
return bindingKey || bindings.containsKey( keyCode ) || hardBindings.containsKey( keyCode );
|
||||
@@ -80,6 +80,13 @@ public class KeyBindings {
|
||||
return ControllerHandler.customButtonName(keyCode);
|
||||
}
|
||||
|
||||
//custom codes for mouse buttons
|
||||
if (keyCode == 1003){
|
||||
return "Mouse 4";
|
||||
} else if (keyCode == 1004) {
|
||||
return "Mouse 5";
|
||||
}
|
||||
|
||||
if (keyCode == Input.Keys.UNKNOWN){
|
||||
return "None";
|
||||
} else if (keyCode == Input.Keys.PLUS){
|
||||
|
||||
Reference in New Issue
Block a user