diff options
author | isXander <xandersmith2008@gmail.com> | 2023-05-21 12:41:45 +0100 |
---|---|---|
committer | isXander <xandersmith2008@gmail.com> | 2023-05-21 12:41:45 +0100 |
commit | 21afea0da3956f2d8cca81a54fa9820152e0c077 (patch) | |
tree | e5944f94a5f85d3fcbe048da633e62f5357fe835 /common/src/main/java/dev/isxander/yacl/api/Option.java | |
parent | e51af159ba3eba5ebda976bea1c1957cddeee7c6 (diff) | |
download | YetAnotherConfigLib-21afea0da3956f2d8cca81a54fa9820152e0c077.tar.gz YetAnotherConfigLib-21afea0da3956f2d8cca81a54fa9820152e0c077.tar.bz2 YetAnotherConfigLib-21afea0da3956f2d8cca81a54fa9820152e0c077.zip |
Start overhauling UI
Diffstat (limited to 'common/src/main/java/dev/isxander/yacl/api/Option.java')
-rw-r--r-- | common/src/main/java/dev/isxander/yacl/api/Option.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/common/src/main/java/dev/isxander/yacl/api/Option.java b/common/src/main/java/dev/isxander/yacl/api/Option.java index a6c0311..5f66c19 100644 --- a/common/src/main/java/dev/isxander/yacl/api/Option.java +++ b/common/src/main/java/dev/isxander/yacl/api/Option.java @@ -17,10 +17,13 @@ public interface Option<T> { */ @NotNull Component name(); + @NotNull OptionDescription description(); + /** * Tooltip (or description) of the option. * Rendered on hover. */ + @Deprecated @NotNull Component tooltip(); /** @@ -126,12 +129,17 @@ public interface Option<T> { */ Builder<T> name(@NotNull Component name); + Builder<T> description(@NotNull OptionDescription description); + + Builder<T> description(@NotNull Function<T, OptionDescription> descriptionFunction); + /** * Sets the tooltip to be used by the option. * No need to wrap the text yourself, the gui does this itself. * * @param tooltipGetter function to get tooltip depending on value {@link Builder#build()}. */ + @Deprecated Builder<T> tooltip(@NotNull Function<T, Component> tooltipGetter); /** @@ -150,6 +158,7 @@ public interface Option<T> { * * @param tooltips text lines - merged with a new-line on {@link Builder#build()}. */ + @Deprecated Builder<T> tooltip(@NotNull Component... tooltips); /** |