Class ButtonTab<T extends Serializable>

java.lang.Object
net.minecraft.client.gui.tab.GridScreenTab
net.uku3lig.ukulib.config.option.widget.ButtonTab<T>
Type Parameters:
T - The type of the config
All Implemented Interfaces:
net.minecraft.client.gui.tab.Tab

public abstract class ButtonTab<T extends Serializable> extends net.minecraft.client.gui.tab.GridScreenTab
A tab made with WidgetCreator for ease of use.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final ConfigManager<T>
    The config manager

    Fields inherited from class net.minecraft.client.gui.tab.GridScreenTab

    grid
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    ButtonTab(String key, ConfigManager<T> manager)
    Creates a widget tab and adds all the given widgets to it.
    protected
    ButtonTab(net.minecraft.text.Text title, ConfigManager<T> manager)
    Creates a widget tab and adds all the given widgets to it
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract WidgetCreator[]
    getWidgets(T config)
    The widgets to be shown in this tab

    Methods inherited from class net.minecraft.client.gui.tab.GridScreenTab

    forEachChild, getTitle, refreshGrid

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.client.gui.tab.Tab

    tick
  • Field Details

  • Constructor Details

    • ButtonTab

      protected ButtonTab(net.minecraft.text.Text title, ConfigManager<T> manager)
      Creates a widget tab and adds all the given widgets to it
      Parameters:
      title - The title of the tab
      manager - The config manager
    • ButtonTab

      protected ButtonTab(String key, ConfigManager<T> manager)
      Creates a widget tab and adds all the given widgets to it. The title is created from the given translation key.
      Parameters:
      key - The translation key of the title
      manager - The config manager
  • Method Details

    • getWidgets

      protected abstract WidgetCreator[] getWidgets(T config)
      The widgets to be shown in this tab
      Parameters:
      config - The config
      Returns:
      The array of widgets to be displayed