Class ButtonTab<T extends Serializable>

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

public abstract class ButtonTab<T extends Serializable> extends net.minecraft.client.gui.components.tabs.GridLayoutTab
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.components.tabs.GridLayoutTab

    layout
  • 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.network.chat.Component 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.components.tabs.GridLayoutTab

    doLayout, getLayout, getTabExtraNarration, getTabTitle, visitChildren

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • ButtonTab

      protected ButtonTab(net.minecraft.network.chat.Component 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