From 43403262b72519edb904baaa48a869dd6b015c17 Mon Sep 17 00:00:00 2001 From: Juuxel <6596629+Juuxel@users.noreply.github.com> Date: Sun, 26 Jan 2020 00:10:10 +0200 Subject: Fix WWidget.onMouseMove using X pos for Y pos --- gradle.properties | 2 +- .../java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java | 2 +- .../io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index 2586ca0..1ef1e05 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G loader_version=0.7.5+build.178 # Mod Properties - mod_version = 1.5.0 + mod_version = 1.5.1 maven_group = io.github.cottonmc archives_base_name = LibGui diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java index be13275..9c13927 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java @@ -187,7 +187,7 @@ public class CottonClientScreen extends Screen implements TextHoverRendererScree WPanel root = description.getRootPanel(); int containerX = (int)mouseX-left; - int containerY = (int)mouseX-top; + int containerY = (int)mouseY-top; WWidget child = root.hit(containerX, containerY); child.onMouseMove(containerX - child.getAbsoluteX(), containerY - child.getAbsoluteY()); diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java index 56818d7..dc6c87f 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java @@ -177,7 +177,7 @@ public class CottonInventoryScreen extends C WPanel root = description.getRootPanel(); int containerX = (int)mouseX-x; - int containerY = (int)mouseX-y; + int containerY = (int)mouseY-y; WWidget child = root.hit(containerX, containerY); child.onMouseMove(containerX - child.getAbsoluteX(), containerY - child.getAbsoluteY()); -- cgit