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/api/DisplayHelper.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/api/DisplayHelper.java')
| -rw-r--r-- | src/main/java/me/shedaniel/rei/api/DisplayHelper.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/me/shedaniel/rei/api/DisplayHelper.java b/src/main/java/me/shedaniel/rei/api/DisplayHelper.java index 33cc985ba..2fe8be295 100644 --- a/src/main/java/me/shedaniel/rei/api/DisplayHelper.java +++ b/src/main/java/me/shedaniel/rei/api/DisplayHelper.java @@ -7,6 +7,7 @@ package me.shedaniel.rei.api; import me.shedaniel.math.api.Rectangle; import me.shedaniel.rei.RoughlyEnoughItemsCore; +import me.shedaniel.rei.gui.config.SearchFieldLocation; import net.minecraft.util.ActionResult; import java.util.List; @@ -112,7 +113,7 @@ public interface DisplayHelper { * @return the item list bounds */ default Rectangle getItemListArea(Rectangle rectangle) { - return new Rectangle(rectangle.x + 1, rectangle.y + 2 + (RoughlyEnoughItemsCore.getConfigManager().getConfig().isEntryListWidgetScrolled() ? 0 : 22), rectangle.width - 2, rectangle.height - (RoughlyEnoughItemsCore.getConfigManager().getConfig().isSideSearchField() ? 27 + 22 : 27) + (!RoughlyEnoughItemsCore.getConfigManager().getConfig().isEntryListWidgetScrolled() ? 0 : 22)); + return new Rectangle(rectangle.x + 1, rectangle.y + 2 + (RoughlyEnoughItemsCore.getConfigManager().getConfig().getSearchFieldLocation() == SearchFieldLocation.TOP_SIDE ? 24 : 0) + (RoughlyEnoughItemsCore.getConfigManager().getConfig().isEntryListWidgetScrolled() ? 0 : 22), rectangle.width - 2, rectangle.height - (RoughlyEnoughItemsCore.getConfigManager().getConfig().getSearchFieldLocation() != SearchFieldLocation.CENTER ? 27 + 22 : 27) + (!RoughlyEnoughItemsCore.getConfigManager().getConfig().isEntryListWidgetScrolled() ? 0 : 22)); } /** |
