diff options
| author | shedaniel <daniel@shedaniel.me> | 2020-11-16 01:36:17 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2020-11-16 01:36:17 +0800 |
| commit | 883738ac49e261eb1b9cfbd68a14900cb4450cf2 (patch) | |
| tree | d9f339f2cb133aadd945349a4df5e2c5c4e8458c | |
| parent | b7cb9e2a7dd9ea67201b25788a0cd67a63cebb45 (diff) | |
| download | RoughlyEnoughItems-883738ac49e261eb1b9cfbd68a14900cb4450cf2.tar.gz RoughlyEnoughItems-883738ac49e261eb1b9cfbd68a14900cb4450cf2.tar.bz2 RoughlyEnoughItems-883738ac49e261eb1b9cfbd68a14900cb4450cf2.zip | |
Remove resize dynamically
Signed-off-by: shedaniel <daniel@shedaniel.me>
4 files changed, 6 insertions, 13 deletions
diff --git a/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/ConfigObject.java b/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/ConfigObject.java index da43f244f..8bce78e5b 100644 --- a/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/ConfigObject.java +++ b/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/ConfigObject.java @@ -181,6 +181,8 @@ public interface ConfigObject { boolean isInventoryHighlightingAllowed(); + @Deprecated + @ApiStatus.ScheduledForRemoval boolean shouldResizeDynamically(); @ApiStatus.Experimental diff --git a/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java b/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java index 6e2819812..ebe5c1080 100644 --- a/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java +++ b/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java @@ -223,8 +223,7 @@ public class RecipeViewingScreen extends Screen implements RecipeScreen { int largestHeight = Math.max(height - 34 - 30, 100); int maxWidthDisplay = CollectionUtils.mapAndMax(getCurrentDisplayed(), selectedCategory::getDisplayWidth, Comparator.naturalOrder()).orElse(150); int guiWidth = Math.max(maxWidthDisplay + 40, 190); - int guiHeight = Mth.floor(Mth.clamp((double) (selectedCategory.getDisplayHeight() + 4) * (getRecipesPerPage() + 1) + 36, 100, largestHeight)); - if (!ConfigObject.getInstance().shouldResizeDynamically()) guiHeight = largestHeight; + int guiHeight = largestHeight; this.tabsPerPage = Math.max(5, Mth.floor((guiWidth - 20d) / tabSize)); if (this.categoryPages == -1) { this.categoryPages = Math.max(0, categories.indexOf(selectedCategory) / tabsPerPage); @@ -557,14 +556,7 @@ public class RecipeViewingScreen extends Screen implements RecipeScreen { recipeBack.onClick(); return recipeBack.isEnabled(); } - for (GuiEventListener entry : children()) - if (entry.mouseClicked(mouseX, mouseY, button)) { - setFocused(entry); - if (button == 0) - setDragging(true); - return true; - } - return false; + return super.mouseClicked(mouseX, mouseY, button); } @Override diff --git a/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java b/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java index 1bea42943..52352366a 100644 --- a/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java +++ b/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java @@ -341,7 +341,7 @@ public class ConfigObjectImpl implements ConfigObject, ConfigData { @Override public boolean shouldResizeDynamically() { - return advanced.accessibility.resizeDynamically; + return false; } @ApiStatus.Experimental @@ -469,7 +469,6 @@ public class ConfigObjectImpl implements ConfigObject, ConfigData { @Comment("Declares how the scrollbar in villager screen should act.") private boolean villagerScreenPermanentScrollBar = false; private boolean toastDisplayedOnCopyIdentifier = true; @Comment("Declares whether REI should use compact tabs for categories.") private boolean useCompactTabs = true; - @Comment("Declares whether REI should resize its recipe window dynamically") private boolean resizeDynamically = false; } public static class Search { diff --git a/gradle.properties b/gradle.properties index e6c20fd2e..ea09ce46b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ org.gradle.jvmargs=-Xmx3G -mod_version=5.8.4 +mod_version=5.8.5 supported_version=1.16.2/3/4 minecraft_version=1.16.4 fabricloader_version=0.10.6+build.214 |
