mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-20 20:22:17 +00:00
Allow scrolling through recipe handlers (#379)
In addition to scrolling through all recipes of a single handler, you can now scroll through all the recipe handlers while hovering over the handler tab bar (or anywhere in the recipe area while holding left shift).
This commit is contained in:
1 parent
ad86d8f9c5
commit
e8094794c3
2 files changed
+26
-2
No files matched your search
@@ -388,6 +388,8 @@ 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 (new Rectangle(guiLeft, guiTop, xSize, ySize).contains(GuiDraw.getMousePosition())) {
|
||||
@@ -462,11 +464,11 @@ public abstract class GuiRecipe<H extends IRecipeHandler> extends GuiContainer i
|
||||
if (page < 0) page = (handler.numRecipes() - 1) / getRecipesPerPage();
|
||||
}
|
||||
|
||||
private void nextType() {
|
||||
protected void nextType() {
|
||||
setRecipePage(++recipetype);
|
||||
}
|
||||
|
||||
private void prevType() {
|
||||
protected void prevType() {
|
||||
setRecipePage(--recipetype);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user