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 class InputManager
|
||||||
{
|
{
|
||||||
public static final InputManager INPUT_MANAGER = new InputManager();
|
public static final InputManager INPUT_MANAGER = new InputManager();
|
||||||
private static final List<ButtonBinding> BINDINGS = new ArrayList<>();
|
private static final List<ButtonBinding> BINDINGS = new ArrayList<>();
|
||||||
private static final List<ButtonCategory> CATEGORIES = new ArrayList<>();
|
private static final List<ButtonCategory> CATEGORIES = new ArrayList<>();
|
||||||
public static final Map<Integer, ButtonState> STATES = new HashMap<>();
|
public static final Map<Integer, ButtonState> STATES = new HashMap<>();
|
||||||
public static final Map<Integer, Float> BUTTON_VALUES = new HashMap<>();
|
public static final Map<Integer, Float> BUTTON_VALUES = new HashMap<>();
|
||||||
private int prevTargetMouseX = 0;
|
private int prevTargetMouseX = 0;
|
||||||
private int prevTargetMouseY = 0;
|
private int prevTargetMouseY = 0;
|
||||||
private int targetMouseX = 0;
|
private int targetMouseX = 0;
|
||||||
private int targetMouseY = 0;
|
private int targetMouseY = 0;
|
||||||
|
|
||||||
protected InputManager()
|
protected InputManager()
|
||||||
{
|
{
|
||||||
@@ -345,6 +345,11 @@ public class InputManager
|
|||||||
else
|
else
|
||||||
state = ButtonState.NONE;
|
state = ButtonState.NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (state == ButtonState.RELEASE && !binding.pressed) {
|
||||||
|
state = ButtonState.NONE;
|
||||||
|
}
|
||||||
|
|
||||||
binding.pressed = state.isPressed();
|
binding.pressed = state.isPressed();
|
||||||
binding.update();
|
binding.update();
|
||||||
if (binding.pressed)
|
if (binding.pressed)
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
],
|
],
|
||||||
"depends": {
|
"depends": {
|
||||||
"fabricloader": ">=0.8.0",
|
"fabricloader": ">=0.8.0",
|
||||||
"fabric": "*",
|
"fabric": ">=0.4.0",
|
||||||
"minecraft": ">=1.16",
|
"minecraft": ">=1.16",
|
||||||
"spruceui": ">=1.5.2"
|
"spruceui": ">=1.5.2"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -8,12 +8,12 @@ org.gradle.jvmargs=-Xmx1G
|
|||||||
loader_version=0.9.0+build.204
|
loader_version=0.9.0+build.204
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.4.1
|
mod_version = 1.4.2
|
||||||
maven_group = me.lambdaurora.lambdacontrols
|
maven_group = me.lambdaurora.lambdacontrols
|
||||||
archives_base_name = lambdacontrols
|
archives_base_name = lambdacontrols
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
||||||
fabric_version=0.15.0+build.379-1.16.1
|
fabric_version=0.15.0+build.379-1.16.1
|
||||||
spruceui_version=1.5.9
|
spruceui_version=1.5.11
|
||||||
modmenu_version=1.12.2+build.17
|
modmenu_version=1.12.2+build.17
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ dependencies {
|
|||||||
}
|
}
|
||||||
api 'org.spigotmc:spigot-api:1.15.1-R0.1-SNAPSHOT'
|
api 'org.spigotmc:spigot-api:1.15.1-R0.1-SNAPSHOT'
|
||||||
api 'io.netty:netty-all:4.1.28.Final'
|
api 'io.netty:netty-all:4.1.28.Final'
|
||||||
|
implementation "com.electronwill.night-config:core:3.5.3"
|
||||||
|
implementation "com.electronwill.night-config:toml:3.5.3"
|
||||||
}
|
}
|
||||||
|
|
||||||
processResources {
|
processResources {
|
||||||
|
|||||||
Reference in New Issue
Block a user