forked from Clones/Controlify
✏️ Remove VMouse Escape in favour of existing GUI Back bind
This commit is contained in:
@ -267,13 +267,12 @@ public class Controlify implements ControlifyApi {
|
||||
return;
|
||||
}
|
||||
|
||||
this.virtualMouseHandler().handleControllerInput(controller);
|
||||
if (minecraft.screen != null) {
|
||||
ScreenProcessorProvider.provide(minecraft.screen).onControllerUpdate(controller);
|
||||
}
|
||||
if (minecraft.level != null) {
|
||||
} else if (minecraft.level != null) {
|
||||
this.inGameInputHandler().ifPresent(InGameInputHandler::inputTick);
|
||||
}
|
||||
this.virtualMouseHandler().handleControllerInput(controller);
|
||||
|
||||
ControlifyEvents.ACTIVE_CONTROLLER_TICKED.invoker().onControllerStateUpdate(controller);
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ public class ControllerBindings<T extends ControllerState> {
|
||||
VMOUSE_MOVE_UP, VMOUSE_MOVE_DOWN, VMOUSE_MOVE_LEFT, VMOUSE_MOVE_RIGHT,
|
||||
VMOUSE_LCLICK, VMOUSE_RCLICK, VMOUSE_SHIFT_CLICK,
|
||||
VMOUSE_SCROLL_UP, VMOUSE_SCROLL_DOWN,
|
||||
VMOUSE_ESCAPE, VMOUSE_SHIFT,
|
||||
VMOUSE_SHIFT,
|
||||
VMOUSE_TOGGLE,
|
||||
GUI_NAVI_UP, GUI_NAVI_DOWN, GUI_NAVI_LEFT, GUI_NAVI_RIGHT,
|
||||
CYCLE_OPT_FORWARD, CYCLE_OPT_BACKWARD,
|
||||
@ -287,11 +287,6 @@ public class ControllerBindings<T extends ControllerState> {
|
||||
.defaultBind(GamepadBinds.RIGHT_STICK_BACKWARD)
|
||||
.category(VMOUSE_CATEGORY)
|
||||
.build());
|
||||
register(VMOUSE_ESCAPE = ControllerBindingBuilder.create(controller)
|
||||
.identifier("controlify", "vmouse_escape")
|
||||
.defaultBind(GamepadBinds.B_BUTTON)
|
||||
.category(VMOUSE_CATEGORY)
|
||||
.build());
|
||||
register(VMOUSE_SHIFT = ControllerBindingBuilder.create(controller)
|
||||
.identifier("controlify", "vmouse_shift")
|
||||
.defaultBind(GamepadBinds.LEFT_STICK_PRESS)
|
||||
|
@ -114,10 +114,8 @@ public class VirtualMouseHandler {
|
||||
mouseHandler.invokeOnPress(minecraft.getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_LEFT, GLFW.GLFW_RELEASE, 0);
|
||||
}
|
||||
|
||||
if (controller.bindings().VMOUSE_ESCAPE.justPressed()) {
|
||||
keyboardHandler.invokeKeyPress(minecraft.getWindow().getWindow(), GLFW.GLFW_KEY_ESCAPE, 0, GLFW.GLFW_PRESS, 0);
|
||||
} else if (controller.bindings().VMOUSE_ESCAPE.justReleased()) {
|
||||
keyboardHandler.invokeKeyPress(minecraft.getWindow().getWindow(), GLFW.GLFW_KEY_ESCAPE, 0, GLFW.GLFW_RELEASE, 0);
|
||||
if (controller.bindings().GUI_BACK.justPressed() && minecraft.screen != null) {
|
||||
minecraft.screen.onClose();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user