diff options
| author | Unknown <shekwancheung0528@gmail.com> | 2019-08-18 19:19:14 +0800 |
|---|---|---|
| committer | Unknown <shekwancheung0528@gmail.com> | 2019-08-18 19:19:14 +0800 |
| commit | 866a775b643b1d729ccaf79e5e1772d481046246 (patch) | |
| tree | 0babf3420f349a93a2bc4ebbdc09fa7c44bfc748 /src/main/java/me/shedaniel/rei/gui/ContainerScreenOverlay.java | |
| parent | d02fc1b8dbccefb88c50e4a8780fb8212960041b (diff) | |
| download | RoughlyEnoughItems-866a775b643b1d729ccaf79e5e1772d481046246.tar.gz RoughlyEnoughItems-866a775b643b1d729ccaf79e5e1772d481046246.tar.bz2 RoughlyEnoughItems-866a775b643b1d729ccaf79e5e1772d481046246.zip | |
Close #140
Diffstat (limited to 'src/main/java/me/shedaniel/rei/gui/ContainerScreenOverlay.java')
| -rw-r--r-- | src/main/java/me/shedaniel/rei/gui/ContainerScreenOverlay.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/me/shedaniel/rei/gui/ContainerScreenOverlay.java b/src/main/java/me/shedaniel/rei/gui/ContainerScreenOverlay.java index 4d7b513c5..bd21cf910 100644 --- a/src/main/java/me/shedaniel/rei/gui/ContainerScreenOverlay.java +++ b/src/main/java/me/shedaniel/rei/gui/ContainerScreenOverlay.java @@ -15,6 +15,7 @@ import me.shedaniel.rei.api.ClientHelper; import me.shedaniel.rei.api.DisplayHelper; import me.shedaniel.rei.api.Entry; import me.shedaniel.rei.api.RecipeHelper; +import me.shedaniel.rei.gui.config.SearchFieldLocation; import me.shedaniel.rei.gui.widget.*; import me.shedaniel.rei.impl.RecipeHelperImpl; import me.shedaniel.rei.impl.ScreenHelper; @@ -327,8 +328,11 @@ public class ContainerScreenOverlay extends Widget { private Rectangle getTextFieldArea() { int widthRemoved = RoughlyEnoughItemsCore.getConfigManager().getConfig().isCraftableFilterEnabled() ? 22 : 2; - if (RoughlyEnoughItemsCore.getConfigManager().getConfig().isSideSearchField()) + SearchFieldLocation searchFieldLocation = RoughlyEnoughItemsCore.getConfigManager().getConfig().getSearchFieldLocation(); + if (searchFieldLocation == SearchFieldLocation.BOTTOM_SIDE) return new Rectangle(rectangle.x + 2, window.getScaledHeight() - 22, rectangle.width - 6 - widthRemoved, 18); + if (searchFieldLocation == SearchFieldLocation.TOP_SIDE) + return new Rectangle(rectangle.x + 2, 4, rectangle.width - 6 - widthRemoved, 18); if (MinecraftClient.getInstance().currentScreen instanceof RecipeViewingScreen) { RecipeViewingScreen widget = (RecipeViewingScreen) MinecraftClient.getInstance().currentScreen; return new Rectangle(widget.getBounds().x, window.getScaledHeight() - 22, widget.getBounds().width - widthRemoved, 18); |
