diff options
| author | shedaniel <daniel@shedaniel.me> | 2020-03-07 03:10:43 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2020-03-07 03:10:43 +0800 |
| commit | 250159221c07f884252a37daf00c74f41cf69d52 (patch) | |
| tree | 702aef7062c1d7a8ddfcfa686076e55030bb334f /src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java | |
| parent | 12223ae029f3d206ebb19ba0cd134e3c36827315 (diff) | |
| download | RoughlyEnoughItems-250159221c07f884252a37daf00c74f41cf69d52.tar.gz RoughlyEnoughItems-250159221c07f884252a37daf00c74f41cf69d52.tar.bz2 RoughlyEnoughItems-250159221c07f884252a37daf00c74f41cf69d52.zip | |
stuff
Signed-off-by: shedaniel <daniel@shedaniel.me>
Diffstat (limited to 'src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java')
| -rw-r--r-- | src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java b/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java index 7ba09f59d..d20000a30 100644 --- a/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java +++ b/src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java @@ -327,7 +327,7 @@ public class VillagerRecipeViewingScreen extends Screen implements RecipeScreen for (Element listener : children()) if (listener.mouseScrolled(double_1, double_2, double_3)) return true; - if (bounds.contains(PointHelper.fromMouse())) { + if (bounds.contains(PointHelper.ofMouse())) { if (double_3 < 0 && categoryMap.get(categories.get(selectedCategoryIndex)).size() > 1) { selectedRecipeIndex++; if (selectedRecipeIndex >= categoryMap.get(categories.get(selectedCategoryIndex)).size()) @@ -392,7 +392,7 @@ public class VillagerRecipeViewingScreen extends Screen implements RecipeScreen if (buttonWidgets.get(i).getBounds().getMaxY() > scrollListBounds.getMinY() && buttonWidgets.get(i).getBounds().getMinY() < scrollListBounds.getMaxY()) { recipeRenderers.get(i).setZ(1); recipeRenderers.get(i).render(buttonWidgets.get(i).getBounds(), mouseX, mouseY, delta); - ScreenHelper.getLastOverlay().addTooltip(recipeRenderers.get(i).getTooltip(mouseX, mouseY)); + REIHelper.getInstance().addTooltip(recipeRenderers.get(i).getTooltip(mouseX, mouseY)); } } double maxScroll = getMaxScrollPosition(); @@ -405,7 +405,7 @@ public class VillagerRecipeViewingScreen extends Screen implements RecipeScreen height = Math.max(10, height); int minY = (int) Math.min(Math.max((int) scrollAmount * (scrollListBounds.height - 2 - height) / getMaxScroll() + scrollListBounds.y + 1, scrollListBounds.y + 1), scrollListBounds.getMaxY() - 1 - height); int scrollbarPositionMinX = scrollListBounds.getMaxX() - 6, scrollbarPositionMaxX = scrollListBounds.getMaxX() - 1; - boolean hovered = (new Rectangle(scrollbarPositionMinX, minY, scrollbarPositionMaxX - scrollbarPositionMinX, height)).contains(PointHelper.fromMouse()); + boolean hovered = (new Rectangle(scrollbarPositionMinX, minY, scrollbarPositionMaxX - scrollbarPositionMinX, height)).contains(PointHelper.ofMouse()); float bottomC = (hovered ? .67f : .5f) * (REIHelper.getInstance().isDarkThemeEnabled() ? 0.8f : 1f); float topC = (hovered ? .87f : .67f) * (REIHelper.getInstance().isDarkThemeEnabled() ? 0.8f : 1f); RenderSystem.disableTexture(); |
