Prevent recipe handler tab scrolling from overwriting recipe handler-specific scrolling (#384)

* Rename variable in GuiRecipeTabs to avoid confusion

Based on feedback in a previous PR review.

* Make sure recipe handler-specific scrolling behavior takes precedence over recipe handler tab scrolling
This commit is contained in:
Wilhelm Schuster authored and GitHub committed 2023-05-13 17:40:08 +02:00
1 parent 68ad800620
commit 4124151208
2 files changed
+7 -7

No files matched your search

@@ -388,10 +388,10 @@ public abstract class GuiRecipe<H extends IRecipeHandler> extends GuiContainer i
// the value of the height field will be different from in other mouseover methods, which
// could be confusing...
if (recipeTabs.mouseScrolled(i)) return;
for (int recipe : getRecipeIndices()) if (handler.mouseScrolled(this, i, recipe)) return;
if (recipeTabs.mouseScrolled(i)) return;
if (new Rectangle(guiLeft, guiTop, xSize, ySize).contains(GuiDraw.getMousePosition())) {
if (i > 0) prevPage();
else nextPage();