aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJuuxel <6596629+Juuxel@users.noreply.github.com>2020-01-26 00:10:10 +0200
committerJuuxel <6596629+Juuxel@users.noreply.github.com>2020-01-26 00:10:10 +0200
commit43403262b72519edb904baaa48a869dd6b015c17 (patch)
tree49eefa6bff69a874b525908dc1182e5745755a00 /src
parentafb2f5c97353fb80d388e7efb9c48f62d3f95702 (diff)
downloadLibGui-43403262b72519edb904baaa48a869dd6b015c17.tar.gz
LibGui-43403262b72519edb904baaa48a869dd6b015c17.tar.bz2
LibGui-43403262b72519edb904baaa48a869dd6b015c17.zip
Fix WWidget.onMouseMove using X pos for Y pos1.5.1
Diffstat (limited to 'src')
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java2
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java2
2 files changed, 2 insertions, 2 deletions
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<T extends CottonCraftingController> 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());