aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/gui/widget/RecipeViewingWidget.java
diff options
context:
space:
mode:
authorUnknown <shekwancheung0528@gmail.com>2019-01-11 21:24:53 +0800
committerUnknown <shekwancheung0528@gmail.com>2019-01-11 21:24:53 +0800
commitc9292fa51e69e051569caa9bd6f61572ac8fdeea (patch)
tree3f8f153e29a594153207db894e2b498bd2fda905 /src/main/java/me/shedaniel/rei/gui/widget/RecipeViewingWidget.java
parent20142b33f979ed4ec6818003447aa9221bedd675 (diff)
downloadRoughlyEnoughItems-c9292fa51e69e051569caa9bd6f61572ac8fdeea.tar.gz
RoughlyEnoughItems-c9292fa51e69e051569caa9bd6f61572ac8fdeea.tar.bz2
RoughlyEnoughItems-c9292fa51e69e051569caa9bd6f61572ac8fdeea.zip
More Recipes
Diffstat (limited to 'src/main/java/me/shedaniel/rei/gui/widget/RecipeViewingWidget.java')
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/RecipeViewingWidget.java9
1 files changed, 7 insertions, 2 deletions
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<IRecipeCategory, List<IRecipeDisplay>> categoriesMap) {
+ public RecipeViewingWidget(Window window, IMixinContainerGui parent, Map<IRecipeCategory, List<IRecipeDisplay>> 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<>();
}
@@ -75,6 +75,11 @@ public class RecipeViewingWidget extends Gui {
}
@Override
+ public void onClosed() {
+ parent.setOverlay(overlay);
+ }
+
+ @Override
protected void onInitialized() {
super.onInitialized();
this.tabs.clear();