From 21afea0da3956f2d8cca81a54fa9820152e0c077 Mon Sep 17 00:00:00 2001 From: isXander Date: Sun, 21 May 2023 12:41:45 +0100 Subject: Start overhauling UI --- common/src/main/java/dev/isxander/yacl/api/Option.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'common/src/main/java/dev/isxander/yacl/api/Option.java') 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 { */ @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 { */ Builder name(@NotNull Component name); + Builder description(@NotNull OptionDescription description); + + Builder description(@NotNull Function 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 tooltip(@NotNull Function tooltipGetter); /** @@ -150,6 +158,7 @@ public interface Option { * * @param tooltips text lines - merged with a new-line on {@link Builder#build()}. */ + @Deprecated Builder tooltip(@NotNull Component... tooltips); /** -- cgit