From c9292fa51e69e051569caa9bd6f61572ac8fdeea Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 11 Jan 2019 21:24:53 +0800 Subject: More Recipes --- .../java/me/shedaniel/rei/gui/widget/RecipeViewingWidget.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/main/java/me/shedaniel/rei/gui/widget/RecipeViewingWidget.java') diff --git a/src/main/java/me/shedaniel/rei/gui/widget/RecipeViewingWidget.java b/src/main/java/me/shedaniel/rei/gui/widget/RecipeViewingWidget.java index b09afa46d..949e4062d 100644 --- a/src/main/java/me/shedaniel/rei/gui/widget/RecipeViewingWidget.java +++ b/src/main/java/me/shedaniel/rei/gui/widget/RecipeViewingWidget.java @@ -40,7 +40,7 @@ public class RecipeViewingWidget extends Gui { private int page, categoryPages; private ButtonWidget recipeBack, recipeNext, categoryBack, categoryNext; - public RecipeViewingWidget(ContainerGuiOverlay overlay, Window window, IMixinContainerGui parent, Map> categoriesMap) { + public RecipeViewingWidget(Window window, IMixinContainerGui parent, Map> categoriesMap) { this.categoryPages = 0; this.parent = parent; this.window = window; @@ -50,7 +50,7 @@ public class RecipeViewingWidget extends Gui { this.categories = new LinkedList<>(categoriesMap.keySet()); Collections.reverse(categories); this.selectedCategory = categories.get(0); - this.overlay = overlay; + this.overlay = parent.getOverlay(); this.tabs = new ArrayList<>(); } @@ -74,6 +74,11 @@ public class RecipeViewingWidget extends Gui { return super.keyPressed(int_1, int_2, int_3); } + @Override + public void onClosed() { + parent.setOverlay(overlay); + } + @Override protected void onInitialized() { super.onInitialized(); -- cgit