From 9ea4a22e9a194fd8fdc2fb03226ab38ee175a6cc Mon Sep 17 00:00:00 2001 From: shedaniel Date: Mon, 26 Oct 2020 10:49:27 +0800 Subject: Favorites Dragging Signed-off-by: shedaniel --- .../java/me/shedaniel/rei/impl/ConfigObjectImpl.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java') 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 ba9b7701e..cc59a0559 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 @@ -32,6 +32,7 @@ import me.shedaniel.clothconfig2.api.Modifier; import me.shedaniel.clothconfig2.api.ModifierKeyCode; import me.shedaniel.rei.api.ConfigObject; import me.shedaniel.rei.api.EntryStack; +import me.shedaniel.rei.api.favorites.FavoriteEntry; import me.shedaniel.rei.gui.config.*; import me.shedaniel.rei.impl.filtering.FilteringRule; import net.fabricmc.api.EnvType; @@ -99,6 +100,11 @@ public class ConfigObjectImpl implements ConfigObject, ConfigData { return basics.cheatingStyle == ItemCheatingStyle.GRAB; } + @Override + public boolean isReducedMotion() { + return basics.reducedMotion; + } + @Override public boolean isToastDisplayedOnCopyIdentifier() { return advanced.accessibility.toastDisplayedOnCopyIdentifier; @@ -229,11 +235,6 @@ public class ConfigObjectImpl implements ConfigObject, ConfigData { return advanced.layout.debugRenderTimeRequired; } - @Override - public boolean doSearchFavorites() { - return advanced.search.searchFavorites; - } - @Override public ModifierKeyCode getFavoriteKeyCode() { return basics.keyBindings.favoriteKeybind == null ? ModifierKeyCode.unknown() : basics.keyBindings.favoriteKeybind; @@ -295,7 +296,7 @@ public class ConfigObjectImpl implements ConfigObject, ConfigData { } @Override - public List getFavorites() { + public List getFavoriteEntries() { return basics.favorites; } @@ -363,7 +364,7 @@ public class ConfigObjectImpl implements ConfigObject, ConfigData { } public static class Basics { - @ConfigEntry.Gui.Excluded public List favorites = new ArrayList<>(); + @ConfigEntry.Gui.Excluded public List favorites = new ArrayList<>(); @Comment("Declares whether cheating mode is on.") private boolean cheating = false; private boolean favoritesEnabled = true; @ConfigEntry.Gui.CollapsibleObject(startExpanded = true) @@ -371,6 +372,7 @@ public class ConfigObjectImpl implements ConfigObject, ConfigData { @Comment("Declares whether REI is visible.") @ConfigEntry.Gui.Excluded private boolean overlayVisible = true; @ConfigEntry.Gui.EnumHandler(option = ConfigEntry.Gui.EnumHandler.EnumDisplayOption.BUTTON) private ItemCheatingStyle cheatingStyle = ItemCheatingStyle.GRAB; + private boolean reducedMotion = false; } public static class KeyBindings { @@ -453,7 +455,6 @@ public class ConfigObjectImpl implements ConfigObject, ConfigData { } public static class Search { - @Comment("Declares whether favorites will be searched.") private boolean searchFavorites = false; @Comment("Declares whether search time should be debugged.") private boolean debugSearchTimeRequired = false; @Comment("Declares whether REI should search async.") private boolean asyncSearch = true; @Comment("Declares how many entries should be grouped one async search.") @ConfigEntry.BoundedDiscrete(min = 25, max = 400) -- cgit