mirror of
https://github.com/TeamMidnightDust/MidnightControls.git
synced 2025-12-13 07:15:10 +01:00
fix: controller mouse click simulation in screens
This commit is contained in:
@@ -396,7 +396,7 @@ public class MidnightInput {
|
||||
accessor.midnightcontrols$onCursorPos(client.getWindow().getHandle(), client.mouse.getX(), client.mouse.getY());
|
||||
switch (storage.state) {
|
||||
// Button pressed
|
||||
case PRESS -> accessor.midnightcontrols$onMouseButton(client.getWindow().getHandle(), new MouseInput(GLFW_MOUSE_BUTTON_LEFT, 1), 0);
|
||||
case PRESS -> accessor.midnightcontrols$onMouseButton(client.getWindow().getHandle(), new MouseInput(GLFW_MOUSE_BUTTON_LEFT, 0), 1);
|
||||
case RELEASE -> { // Button released
|
||||
accessor.midnightcontrols$onMouseButton(client.getWindow().getHandle(), new MouseInput(GLFW_MOUSE_BUTTON_LEFT, 0), 0);
|
||||
client.currentScreen.setDragging(false);
|
||||
|
||||
@@ -29,7 +29,7 @@ public class EmotecraftCompat {
|
||||
InputManager.INPUT_MANAGER.updateMousePosition(client);
|
||||
|
||||
if (stickReleased) {
|
||||
((MouseAccessor) client.mouse).midnightcontrols$onMouseButton(client.getWindow().getHandle(), new MouseInput(GLFW.GLFW_MOUSE_BUTTON_LEFT, GLFW.GLFW_PRESS), 0);
|
||||
((MouseAccessor) client.mouse).midnightcontrols$onMouseButton(client.getWindow().getHandle(), new MouseInput(GLFW.GLFW_MOUSE_BUTTON_LEFT, 0), GLFW.GLFW_PRESS);
|
||||
prevIndex = -1;
|
||||
}
|
||||
else prevIndex = index;
|
||||
|
||||
Reference in New Issue
Block a user