From 2cd3f0737b2008e37f8eaadf479312c60d36e7bc Mon Sep 17 00:00:00 2001 From: shedaniel Date: Sat, 20 Mar 2021 16:40:39 +0800 Subject: Allow customizing what part of REI should animate, disable config screen animation by default Signed-off-by: shedaniel --- .../me/shedaniel/rei/impl/ConfigObjectImpl.java | 23 +++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'runtime/src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java') diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java b/runtime/src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java index ad1ea29b3..9c019f19a 100644 --- a/runtime/src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java +++ b/runtime/src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java @@ -101,8 +101,18 @@ public class ConfigObjectImpl implements ConfigObject, ConfigData { } @Override - public boolean isReducedMotion() { - return basics.reducedMotion; + public boolean isConfigScreenAnimated() { + return basics.motion.configScreenAnimation; + } + + @Override + public boolean isCreditsScreenAnimated() { + return basics.motion.creditsScreenAnimation; + } + + @Override + public boolean isFavoritesAnimated() { + return basics.motion.favoritesAnimation; } @Override @@ -400,7 +410,14 @@ 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; + @ConfigEntry.Gui.CollapsibleObject + private Motion motion = new Motion(); + } + + public static class Motion { + private boolean configScreenAnimation = false; + private boolean creditsScreenAnimation = true; + private boolean favoritesAnimation = true; } public static class KeyBindings { -- cgit