diff options
author | DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> | 2022-08-24 22:51:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-24 22:51:58 +0200 |
commit | daed9569a0f1d2231c4f824f6cffd72d5f8ae8bd (patch) | |
tree | 6efee702c616d96e40a3e69ce89425f0936a7598 /src/main/java/cc/polyfrost/oneconfig/internal/config/Preferences.java | |
parent | a76b49be6dbeb0be3f88870e33d3e10e0e7f8e1c (diff) | |
download | OneConfig-daed9569a0f1d2231c4f824f6cffd72d5f8ae8bd.tar.gz OneConfig-daed9569a0f1d2231c4f824f6cffd72d5f8ae8bd.tar.bz2 OneConfig-daed9569a0f1d2231c4f824f6cffd72d5f8ae8bd.zip |
Notifs (#111)
* Start on notifications
* Finish notifications (pog)
* oop
* internalizing
* misc: set default duration to 4000ms
* Scaling notifs stuff
Co-authored-by: Wyvest <45589059+Wyvest@users.noreply.github.com>
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/internal/config/Preferences.java')
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/internal/config/Preferences.java | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/internal/config/Preferences.java b/src/main/java/cc/polyfrost/oneconfig/internal/config/Preferences.java index 88f726e..bc0e3a9 100644 --- a/src/main/java/cc/polyfrost/oneconfig/internal/config/Preferences.java +++ b/src/main/java/cc/polyfrost/oneconfig/internal/config/Preferences.java @@ -26,10 +26,7 @@ package cc.polyfrost.oneconfig.internal.config; -import cc.polyfrost.oneconfig.config.annotations.Exclude; -import cc.polyfrost.oneconfig.config.annotations.KeyBind; -import cc.polyfrost.oneconfig.config.annotations.Slider; -import cc.polyfrost.oneconfig.config.annotations.Switch; +import cc.polyfrost.oneconfig.config.annotations.*; import cc.polyfrost.oneconfig.config.core.OneKeyBind; import cc.polyfrost.oneconfig.gui.OneConfigGui; import cc.polyfrost.oneconfig.internal.gui.BlurHandler; @@ -49,6 +46,12 @@ public class Preferences extends InternalConfig { ) public static OneKeyBind oneConfigKeyBind = new OneKeyBind(UKeyboard.KEY_RSHIFT); + @Dropdown( + name = "Release Channel", + options = {"Releases", "Pre-Releases"}, + size = 2 + ) + public static int updateChannel = 0; @Switch( name = "Use custom GUI scale", @@ -73,6 +76,10 @@ public class Preferences extends InternalConfig { initialize(); addListener("enableBlur", () -> BlurHandler.INSTANCE.reloadBlur(Platform.getGuiPlatform().getCurrentScreen())); registerKeyBind(oneConfigKeyBind, () -> new TickDelay(() -> Platform.getGuiPlatform().setCurrentScreen(OneConfigGui.create()), 1)); + addListener("updateChannel", () -> { + OneConfigConfig.updateChannel = updateChannel; + OneConfigConfig.getInstance().save(); + }); INSTANCE = this; } |