aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/dev/isxander/yacl3/api/CustomTabProvider.java
diff options
context:
space:
mode:
authorisXander <xander@isxander.dev>2024-04-12 14:41:54 +0100
committerisXander <xander@isxander.dev>2024-04-12 14:41:54 +0100
commit34b62af39b4c9a64e5c04ab8fdf5a978c1cde310 (patch)
tree849cb2322b287876bae47d93a72a4615bee0d2ef /src/main/java/dev/isxander/yacl3/api/CustomTabProvider.java
parent3f607dbea3c4c7a0ef30dd4709f6d5469d869c19 (diff)
downloadYetAnotherConfigLib-34b62af39b4c9a64e5c04ab8fdf5a978c1cde310.tar.gz
YetAnotherConfigLib-34b62af39b4c9a64e5c04ab8fdf5a978c1cde310.tar.bz2
YetAnotherConfigLib-34b62af39b4c9a64e5c04ab8fdf5a978c1cde310.zip
Custom tab api
Diffstat (limited to 'src/main/java/dev/isxander/yacl3/api/CustomTabProvider.java')
-rw-r--r--src/main/java/dev/isxander/yacl3/api/CustomTabProvider.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main/java/dev/isxander/yacl3/api/CustomTabProvider.java b/src/main/java/dev/isxander/yacl3/api/CustomTabProvider.java
new file mode 100644
index 0000000..c890c70
--- /dev/null
+++ b/src/main/java/dev/isxander/yacl3/api/CustomTabProvider.java
@@ -0,0 +1,16 @@
+package dev.isxander.yacl3.api;
+
+import dev.isxander.yacl3.gui.YACLScreen;
+import net.minecraft.client.gui.components.tabs.Tab;
+import net.minecraft.client.gui.navigation.ScreenRectangle;
+
+/**
+ * Allows categories to provide custom tab windows that replaces the
+ * regular YACL options screen. The tabs at the top will remain visible,
+ * but you can now provide custom tab content for richer configurations.
+ * <p>
+ * Part of the GUI API: could change with minecraft updates and is not stable
+ */
+public interface CustomTabProvider {
+ Tab createTab(YACLScreen screen, ScreenRectangle tabArea);
+}