diff options
| author | Vixid <52578495+Vixid1@users.noreply.github.com> | 2022-10-30 10:26:40 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-30 21:26:40 +1100 |
| commit | e4033c2dad92fedb7feb7cfdd205aa6290e4294b (patch) | |
| tree | c27fb17b9d6c12c6cd115e1d002285abf5c1fedb /src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemRecipe.java | |
| parent | 0ff09b9032d2f1a9c5a8cab3c876037702445af6 (diff) | |
| download | notenoughupdates-e4033c2dad92fedb7feb7cfdd205aa6290e4294b.tar.gz notenoughupdates-e4033c2dad92fedb7feb7cfdd205aa6290e4294b.tar.bz2 notenoughupdates-e4033c2dad92fedb7feb7cfdd205aa6290e4294b.zip | |
Recipe History and Fairy Soul distance meter. (#357)
Co-authored-by: Roman / Linnea Gräf <roman.graef@gmail.com>
Co-authored-by: Walker Selby <git@walkerselby.com>
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemRecipe.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemRecipe.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemRecipe.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemRecipe.java index 0a1e5b81..a0a5e71a 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemRecipe.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemRecipe.java @@ -21,8 +21,10 @@ package io.github.moulberry.notenoughupdates.miscgui; import com.google.common.collect.ImmutableList; import io.github.moulberry.notenoughupdates.NEUManager; +import io.github.moulberry.notenoughupdates.NotEnoughUpdates; import io.github.moulberry.notenoughupdates.core.util.ArrowPagesUtils; import io.github.moulberry.notenoughupdates.recipes.NeuRecipe; +import io.github.moulberry.notenoughupdates.recipes.RecipeHistory; import io.github.moulberry.notenoughupdates.recipes.RecipeSlot; import io.github.moulberry.notenoughupdates.recipes.RecipeType; import io.github.moulberry.notenoughupdates.util.Utils; @@ -259,6 +261,12 @@ public class GuiItemRecipe extends GuiScreen { } } } + + if (keyPressed == manager.keybindPreviousRecipe.getKeyCode()) { + NotEnoughUpdates.INSTANCE.openGui = RecipeHistory.getPrevious(); + } else if (keyPressed == manager.keybindNextRecipe.getKeyCode()) { + NotEnoughUpdates.INSTANCE.openGui = RecipeHistory.getNext(); + } } public void changeRecipe(int tabIndex, int recipeIndex) { @@ -278,6 +286,13 @@ public class GuiItemRecipe extends GuiScreen { super.mouseClicked(mouseX, mouseY, mouseButton); NeuRecipe currentRecipe = getCurrentRecipe(); int[] topLeft = currentRecipe.getPageFlipPositionLeftTopCorner(); + + if (mouseButton == 3) { + NotEnoughUpdates.INSTANCE.openGui = RecipeHistory.getPrevious(); + } else if (mouseButton == 4) { + NotEnoughUpdates.INSTANCE.openGui = RecipeHistory.getNext(); + } + ArrowPagesUtils.onPageSwitchMouse( guiLeft, guiTop, |
