mirror of
https://github.com/TeamMidnightDust/MidnightControls.git
synced 2025-12-13 23:25:10 +01:00
Fix chording problem.
This commit is contained in:
@@ -38,15 +38,15 @@ import java.util.stream.Stream;
|
||||
*/
|
||||
public class InputManager
|
||||
{
|
||||
public static final InputManager INPUT_MANAGER = new InputManager();
|
||||
private static final List<ButtonBinding> BINDINGS = new ArrayList<>();
|
||||
private static final List<ButtonCategory> CATEGORIES = new ArrayList<>();
|
||||
public static final Map<Integer, ButtonState> STATES = new HashMap<>();
|
||||
public static final Map<Integer, Float> BUTTON_VALUES = new HashMap<>();
|
||||
private int prevTargetMouseX = 0;
|
||||
private int prevTargetMouseY = 0;
|
||||
private int targetMouseX = 0;
|
||||
private int targetMouseY = 0;
|
||||
public static final InputManager INPUT_MANAGER = new InputManager();
|
||||
private static final List<ButtonBinding> BINDINGS = new ArrayList<>();
|
||||
private static final List<ButtonCategory> CATEGORIES = new ArrayList<>();
|
||||
public static final Map<Integer, ButtonState> STATES = new HashMap<>();
|
||||
public static final Map<Integer, Float> BUTTON_VALUES = new HashMap<>();
|
||||
private int prevTargetMouseX = 0;
|
||||
private int prevTargetMouseY = 0;
|
||||
private int targetMouseX = 0;
|
||||
private int targetMouseY = 0;
|
||||
|
||||
protected InputManager()
|
||||
{
|
||||
@@ -345,6 +345,11 @@ public class InputManager
|
||||
else
|
||||
state = ButtonState.NONE;
|
||||
}
|
||||
|
||||
if (state == ButtonState.RELEASE && !binding.pressed) {
|
||||
state = ButtonState.NONE;
|
||||
}
|
||||
|
||||
binding.pressed = state.isPressed();
|
||||
binding.update();
|
||||
if (binding.pressed)
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.8.0",
|
||||
"fabric": "*",
|
||||
"fabric": ">=0.4.0",
|
||||
"minecraft": ">=1.16",
|
||||
"spruceui": ">=1.5.2"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user