Skip to content

Commit

Permalink
Set back button to correct slot if GUI trim is off
Browse files Browse the repository at this point in the history
  • Loading branch information
AfkF24 authored and LMBishop committed Jan 16, 2024
1 parent 2c96d1a commit c5f63c4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ public void populate(String customElementsPath, List<MenuElement> menuElementsTo

// else find a place for the back button if needed
} else if (backMenuElement != null && backMenuElement.isEnabled()) {
int slot = MenuUtils.getHigherOrEqualMultiple(menuElements.size() + menuElementsToFill.size() + customStaticElements, 9);
int slot = trim ? MenuUtils.getHigherOrEqualMultiple(menuElements.size() + menuElementsToFill.size() + customStaticElements, 9)
: backMenuElement.getSlot(); // place the back button at the defined slot
staticMenuElements[slot] = backMenuElement;
}

Expand Down

0 comments on commit c5f63c4

Please sign in to comment.