diff options
Diffstat (limited to 'versions')
-rw-r--r-- | versions/src/main/java/cc/polyfrost/oneconfig/internal/OneConfig.java | 2 | ||||
-rw-r--r-- | versions/src/main/java/cc/polyfrost/oneconfig/test/TestConfig_Test.java | 15 |
2 files changed, 17 insertions, 0 deletions
diff --git a/versions/src/main/java/cc/polyfrost/oneconfig/internal/OneConfig.java b/versions/src/main/java/cc/polyfrost/oneconfig/internal/OneConfig.java index 1e0704e..c67bd90 100644 --- a/versions/src/main/java/cc/polyfrost/oneconfig/internal/OneConfig.java +++ b/versions/src/main/java/cc/polyfrost/oneconfig/internal/OneConfig.java @@ -42,6 +42,7 @@ import cc.polyfrost.oneconfig.libs.eventbus.Subscribe; import cc.polyfrost.oneconfig.utils.commands.CommandManager; import cc.polyfrost.oneconfig.utils.gui.GuiUtils; import cc.polyfrost.oneconfig.utils.hypixel.HypixelUtils; +import cc.polyfrost.oneconfig.utils.Notifications; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiScreen; import org.apache.logging.log4j.LogManager; @@ -150,6 +151,7 @@ public class OneConfig { EventManager.INSTANCE.register(new HudCore()); HypixelUtils.INSTANCE.initialize(); EventManager.INSTANCE.register(KeyBindHandler.INSTANCE); + EventManager.INSTANCE.register(Notifications.INSTANCE); ConfigCore.sortMods(); initialized = true; diff --git a/versions/src/main/java/cc/polyfrost/oneconfig/test/TestConfig_Test.java b/versions/src/main/java/cc/polyfrost/oneconfig/test/TestConfig_Test.java index 0b14d38..48d52cb 100644 --- a/versions/src/main/java/cc/polyfrost/oneconfig/test/TestConfig_Test.java +++ b/versions/src/main/java/cc/polyfrost/oneconfig/test/TestConfig_Test.java @@ -33,9 +33,14 @@ import cc.polyfrost.oneconfig.config.data.*; import cc.polyfrost.oneconfig.config.Config; import cc.polyfrost.oneconfig.config.data.ModType; import cc.polyfrost.oneconfig.config.migration.VigilanceMigrator; +import cc.polyfrost.oneconfig.gui.animations.Animation; +import cc.polyfrost.oneconfig.gui.animations.EaseInOutQuart; import cc.polyfrost.oneconfig.gui.pages.HomePage; +import cc.polyfrost.oneconfig.internal.assets.SVGs; import cc.polyfrost.oneconfig.libs.universal.UChat; import cc.polyfrost.oneconfig.libs.universal.UKeyboard; +import cc.polyfrost.oneconfig.renderer.Icon; +import cc.polyfrost.oneconfig.utils.Notifications; public class TestConfig_Test extends Config { @@ -189,6 +194,16 @@ public class TestConfig_Test extends Config { super(new Mod("Test Mod", ModType.UTIL_QOL, new VigilanceMigrator("./config/testConfig.toml")), "hacksConfig.json"); initialize(); addDependency("testCheckBox", "testSwitch"); + + registerKeyBind(testKeyBind, () -> { + Animation barAnimation = new EaseInOutQuart(4000, 0f, 1f, false); + Notifications.INSTANCE.send( + "Title", + "Very epic long message that will need to wrap because yes.", + new Icon(SVGs.APERTURE_FILL), + () -> barAnimation.get() + ); + }); } } |