diff options
author | xander <xander@isxander.dev> | 2022-09-01 08:57:59 +0100 |
---|---|---|
committer | xander <xander@isxander.dev> | 2022-09-01 08:57:59 +0100 |
commit | 6f8ef7daaafd71090b2c334c10eadc8dedc738d9 (patch) | |
tree | d4054a65d99070c944132be83d25e109750dc5f9 /src/main/java/dev/isxander/yacl/impl/YetAnotherConfigLibImpl.java | |
parent | 9d0a5e937f97c1c17d034393e01636d5241f376a (diff) | |
download | YetAnotherConfigLib-6f8ef7daaafd71090b2c334c10eadc8dedc738d9.tar.gz YetAnotherConfigLib-6f8ef7daaafd71090b2c334c10eadc8dedc738d9.tar.bz2 YetAnotherConfigLib-6f8ef7daaafd71090b2c334c10eadc8dedc738d9.zip |
GUI Implementation
Added groups
Added button "option"
Added test mod
Diffstat (limited to 'src/main/java/dev/isxander/yacl/impl/YetAnotherConfigLibImpl.java')
-rw-r--r-- | src/main/java/dev/isxander/yacl/impl/YetAnotherConfigLibImpl.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/dev/isxander/yacl/impl/YetAnotherConfigLibImpl.java b/src/main/java/dev/isxander/yacl/impl/YetAnotherConfigLibImpl.java index 0cef49f..5938bad 100644 --- a/src/main/java/dev/isxander/yacl/impl/YetAnotherConfigLibImpl.java +++ b/src/main/java/dev/isxander/yacl/impl/YetAnotherConfigLibImpl.java @@ -3,14 +3,17 @@ package dev.isxander.yacl.impl; import com.google.common.collect.ImmutableList; import dev.isxander.yacl.api.ConfigCategory; import dev.isxander.yacl.api.YetAnotherConfigLib; +import dev.isxander.yacl.gui.YACLScreen; import net.minecraft.client.gui.screen.Screen; import net.minecraft.text.Text; import org.jetbrains.annotations.ApiStatus; +import java.util.function.Consumer; + @ApiStatus.Internal -public record YetAnotherConfigLibImpl(Text title, ImmutableList<ConfigCategory> categories) implements YetAnotherConfigLib { +public record YetAnotherConfigLibImpl(Text title, ImmutableList<ConfigCategory> categories, Runnable saveFunction, Consumer<YACLScreen> initConsumer) implements YetAnotherConfigLib { @Override - public Screen generateScreen() { - return null; + public Screen generateScreen(Screen parent) { + return new YACLScreen(this, parent); } } |