aboutsummaryrefslogtreecommitdiff
path: root/src/client/java/dev/isxander/yacl/api/LabelOption.java
diff options
context:
space:
mode:
authorXander <xander@isxander.dev>2023-04-25 16:28:41 +0100
committerGitHub <noreply@github.com>2023-04-25 16:28:41 +0100
commit13c7ba45ff201423eb8dba8a40cfb66ebb531439 (patch)
tree1e799aa9da11fbc0833bc6b7c6e6799633c2ec50 /src/client/java/dev/isxander/yacl/api/LabelOption.java
parent8ba7196ae990fe9aa98680aba1b387e385fff99c (diff)
downloadYetAnotherConfigLib-13c7ba45ff201423eb8dba8a40cfb66ebb531439.tar.gz
YetAnotherConfigLib-13c7ba45ff201423eb8dba8a40cfb66ebb531439.tar.bz2
YetAnotherConfigLib-13c7ba45ff201423eb8dba8a40cfb66ebb531439.zip
Architectury! (#61)
Diffstat (limited to 'src/client/java/dev/isxander/yacl/api/LabelOption.java')
-rw-r--r--src/client/java/dev/isxander/yacl/api/LabelOption.java41
1 files changed, 0 insertions, 41 deletions
diff --git a/src/client/java/dev/isxander/yacl/api/LabelOption.java b/src/client/java/dev/isxander/yacl/api/LabelOption.java
deleted file mode 100644
index 05c7214..0000000
--- a/src/client/java/dev/isxander/yacl/api/LabelOption.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package dev.isxander.yacl.api;
-
-import dev.isxander.yacl.impl.LabelOptionImpl;
-import net.minecraft.network.chat.Component;
-import org.jetbrains.annotations.NotNull;
-
-import java.util.Collection;
-
-/**
- * A label option is an easier way of creating a label with a {@link dev.isxander.yacl.gui.controllers.LabelController}.
- * This option is immutable and cannot be disabled. Tooltips are supported through
- * {@link Component} styling.
- */
-public interface LabelOption extends Option<Component> {
- @NotNull Component label();
-
- /**
- * Creates a new label option with the given label, skipping a builder for ease.
- */
- static LabelOption create(@NotNull Component label) {
- return new LabelOptionImpl(label);
- }
-
- static dev.isxander.yacl.api.LabelOption.Builder createBuilder() {
- return new LabelOptionImpl.BuilderImpl();
- }
-
- interface Builder {
- /**
- * Appends a line to the label
- */
- dev.isxander.yacl.api.LabelOption.Builder line(@NotNull Component line);
-
- /**
- * Appends multiple lines to the label
- */
- dev.isxander.yacl.api.LabelOption.Builder lines(@NotNull Collection<? extends Component> lines);
-
- LabelOption build();
- }
-}