fix subpage buttons appearing when directly opening a page
@@ -262,17 +262,15 @@ public class SCManualScreen extends Screen {
private void updateRecipeAndIcons(){
currentSubpage = 0;
+ hoverCheckers.clear();
if(currentPage < 0){
recipe = null;
- hoverCheckers.clear();
buttons.get(2).visible = false;
buttons.get(3).visible = false;
return;
}
- hoverCheckers.clear();
-
if(SecurityCraft.instance.manualPages.get(currentPage).hasCustomRecipe())
recipe = SecurityCraft.instance.manualPages.get(currentPage).getRecipe();
else
@@ -373,6 +371,8 @@ public class SCManualScreen extends Screen {
}
subpages.add(helpInfo);
+ buttons.get(2).visible = currentPage != -1 && subpages.size() > 1;
+ buttons.get(3).visible = currentPage != -1 && subpages.size() > 1;
}
static class ChangePageButton extends ClickButton {
