Skip to content

Commit

Permalink
Fix overlay button y offsets
Browse files Browse the repository at this point in the history
  • Loading branch information
wlhlm committed Jul 16, 2023
1 parent b94aabe commit e383c39
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/codechicken/nei/recipe/GuiRecipe.java
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,14 @@ private void initOverlayButtons() {
final int recipesPerPage = getRecipesPerPage();
overlayButtons = new GuiButton[recipesPerPage];
final int xOffset = limitToOneRecipe ? ((xSize / 2) - 2) : (width / 2);
final int yOffset = limitToOneRecipe ? 0 : guiTop - 18;
final String overlayKeyName = NEIClientConfig
.getKeyName(NEIClientConfig.getKeyBinding("gui.overlay_use"), true);
for (int i = 0; i < recipesPerPage; i++) {
overlayButtons[i] = new GuiNEIButton(
OVERLAY_BUTTON_ID_START + i,
xOffset + 65,
16 + (handlerInfo.getHeight() * (i + 1)) - 2,
yOffset + getRecipePosition(i).y + handlerInfo.getHeight(),
buttonWidth,
buttonHeight,
"?");
Expand Down

0 comments on commit e383c39

Please sign in to comment.