Class AbstractConfigScreen<T extends IConfig<T>>

java.lang.Object
net.minecraft.client.gui.DrawableHelper
net.minecraft.client.gui.AbstractParentElement
net.minecraft.client.gui.screen.Screen
net.minecraft.client.gui.screen.option.GameOptionsScreen
net.uku3lig.ukulib.config.screen.AbstractConfigScreen<T>
Type Parameters:
T - The type of the config
All Implemented Interfaces:
net.minecraft.client.gui.Drawable, net.minecraft.client.gui.Element, net.minecraft.client.gui.navigation.Navigable, net.minecraft.client.gui.ParentElement
Direct Known Subclasses:
SubConfigScreen

public abstract class AbstractConfigScreen<T extends IConfig<T>> extends net.minecraft.client.gui.screen.option.GameOptionsScreen
A screen used to edit a config. Instances of this class should NOT be reused.
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.client.gui.screen.Screen

    net.minecraft.client.gui.screen.Screen.SelectedElementNarrationData
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final ConfigManager<T>
    The config manager.
    protected net.minecraft.client.gui.widget.OptionListWidget
    The widget used to display the options.

    Fields inherited from class net.minecraft.client.gui.screen.option.GameOptionsScreen

    gameOptions, parent

    Fields inherited from class net.minecraft.client.gui.screen.Screen

    client, height, itemRenderer, passEvents, textRenderer, title, width

    Fields inherited from class net.minecraft.client.gui.DrawableHelper

    GUI_ICONS_TEXTURE, LIGHT_DIRT_BACKGROUND_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE

    Fields inherited from interface net.minecraft.client.gui.Element

    MAX_DOUBLE_CLICK_INTERVAL
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AbstractConfigScreen(net.minecraft.client.gui.screen.Screen parent, net.minecraft.text.Text title, ConfigManager<T> manager)
    Creates a config screen.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    Draws the buttons in the footer.
    protected abstract net.minecraft.client.option.SimpleOption<?>[]
    getOptions(T config)
    The list of options that will be shown to the user when this screen is displayed.
    protected void
     
    void
     
    void
    render(net.minecraft.client.util.math.MatrixStack matrices, int mouseX, int mouseY, float delta)
     

    Methods inherited from class net.minecraft.client.gui.screen.option.GameOptionsScreen

    close, render

    Methods inherited from class net.minecraft.client.gui.screen.Screen

    addDrawable, addDrawableChild, addElementNarrations, addScreenNarrations, addSelectableChild, applyKeyPressNarratorDelay, applyMouseMoveNarratorDelay, applyMousePressScrollNarratorDelay, applyNarratorModeChangeDelay, children, clearAndInit, clearChildren, filesDragged, findSelectedElementData, getNarratedTitle, getNavigationFocus, getTitle, getTooltipFromItem, handleTextClick, hasAltDown, hasControlDown, hasShiftDown, hasUsageText, hide, init, initTabNavigation, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, keyPressed, narrateScreenIfNarrationEnabled, onDisplayed, remove, renderBackground, renderBackgroundTexture, renderOrderedTooltip, renderTextHoverEffect, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderWithTooltip, resize, setInitialFocus, setTooltip, setTooltip, setTooltip, setTooltip, shouldCloseOnEsc, shouldPause, switchFocus, tick, updateNarrator, wrapScreenError

    Methods inherited from class net.minecraft.client.gui.AbstractParentElement

    getFocused, isDragging, setDragging, setFocused

    Methods inherited from class net.minecraft.client.gui.DrawableHelper

    disableScissor, drawBorder, drawCenteredTextWithShadow, drawCenteredTextWithShadow, drawCenteredTextWithShadow, drawHorizontalLine, drawNineSlicedTexture, drawNineSlicedTexture, drawNineSlicedTexture, drawRepeatingTexture, drawSprite, drawSprite, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawTextWithShadow, drawTextWithShadow, drawVerticalLine, drawWithOutline, enableScissor, fill, fill, fillGradient, fillGradient, fillGradient

    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.Element

    mouseMoved

    Methods inherited from interface net.minecraft.client.gui.navigation.Navigable

    getNavigationOrder

    Methods inherited from interface net.minecraft.client.gui.ParentElement

    charTyped, focusOn, getFocusedPath, getNavigationPath, hoveredElement, isFocused, keyReleased, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, setFocused
  • Field Details

    • manager

      protected final ConfigManager<T extends IConfig<T>> manager
      The config manager. Used to load and save the config.
    • optionList

      protected net.minecraft.client.gui.widget.OptionListWidget optionList
      The widget used to display the options.
      See Also:
  • Constructor Details

    • AbstractConfigScreen

      protected AbstractConfigScreen(net.minecraft.client.gui.screen.Screen parent, net.minecraft.text.Text title, ConfigManager<T> manager)
      Creates a config screen.
      Parameters:
      parent - The parent screen
      title - The title of the screen
      manager - The config manager
  • Method Details

    • getOptions

      protected abstract net.minecraft.client.option.SimpleOption<?>[] getOptions(T config)
      The list of options that will be shown to the user when this screen is displayed.
      Parameters:
      config - The config
      Returns:
      An array of SimpleOption
    • init

      protected void init()
      Overrides:
      init in class net.minecraft.client.gui.screen.Screen
    • drawFooterButtons

      protected void drawFooterButtons()
      Draws the buttons in the footer.
    • render

      public void render(net.minecraft.client.util.math.MatrixStack matrices, int mouseX, int mouseY, float delta)
      Specified by:
      render in interface net.minecraft.client.gui.Drawable
      Overrides:
      render in class net.minecraft.client.gui.screen.Screen
    • removed

      public void removed()
      Overrides:
      removed in class net.minecraft.client.gui.screen.option.GameOptionsScreen