aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io
diff options
context:
space:
mode:
authorJuuxel <kasperi.kauppi@gmail.com>2019-09-01 09:24:35 +0300
committerJuuxel <kasperi.kauppi@gmail.com>2019-09-01 09:24:35 +0300
commite17a411ca512b6b08a577941f04659d7d007ec3d (patch)
treee2ec2acedc9f9dc57ca02986a46cdc98365d892b /src/main/java/io
parent82908f7397658b12d045df103db0f32779f33089 (diff)
downloadLibGui-e17a411ca512b6b08a577941f04659d7d007ec3d.tar.gz
LibGui-e17a411ca512b6b08a577941f04659d7d007ec3d.tar.bz2
LibGui-e17a411ca512b6b08a577941f04659d7d007ec3d.zip
Deliver mouse scrolling events to the root panel as well
Diffstat (limited to 'src/main/java/io')
-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, 0 insertions, 4 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 11d7dbd..91cf7b5 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
@@ -177,8 +177,6 @@ public class CottonClientScreen extends Screen {
int containerY = (int)mouseY-top;
WWidget child = root.hit(containerX, containerY);
- if (child == root) return false;
-
child.onMouseScroll(containerX - child.getAbsoluteX(), containerY - child.getAbsoluteY(), amount);
return true;
}
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 e3df6d6..07cd84b 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
@@ -150,8 +150,6 @@ public class CottonInventoryScreen<T extends CottonCraftingController> extends A
int containerY = (int)mouseY-top;
WWidget child = root.hit(containerX, containerY);
- if (child == root) return false;
-
child.onMouseScroll(containerX - child.getAbsoluteX(), containerY - child.getAbsoluteY(), amount);
return true;
}