Skip to content

Commit

Permalink
Improve recipe hover detection for tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
mezz committed Feb 27, 2017
1 parent 0925f06 commit 1c05339
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/mezz/jei/gui/recipes/RecipeLayout.java
Expand Up @@ -160,10 +160,9 @@ public void draw(Minecraft minecraft, final int mouseX, final int mouseY) {

@Override
public boolean isMouseOver(int mouseX, int mouseY) {
final int recipeMouseX = mouseX - posX;
final int recipeMouseY = mouseY - posY;
final IDrawable background = recipeCategory.getBackground();
return recipeMouseX >= 0 && recipeMouseX < background.getWidth() && recipeMouseY >= 0 && recipeMouseY < background.getHeight();
return recipeMouseY >= 0 && recipeMouseY < background.getHeight();
}

@Override
Expand Down

0 comments on commit 1c05339

Please sign in to comment.