Package net.uku3lig.ukulib.config.screen
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.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
FieldsModifier and TypeFieldDescriptionprotected net.minecraft.client.gui.widget.ButtonListWidgetThe widget used to display the options.protected final ConfigManager<T>The config manager.Fields inherited from class net.minecraft.client.gui.screen.option.GameOptionsScreen
gameOptions, parentFields inherited from class net.minecraft.client.gui.screen.Screen
client, height, itemRenderer, passEvents, textRenderer, title, widthFields inherited from class net.minecraft.client.gui.DrawableHelper
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractConfigScreen(net.minecraft.client.gui.screen.Screen parent, net.minecraft.text.Text title, ConfigManager<T> manager) Creates a config screen. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidDraws the buttons in the footer.protected abstract net.minecraft.client.option.Option[]getOptions(T config) The list of options that will be shown to the user when this screen is displayed.protected voidinit()voidremoved()voidrender(net.minecraft.client.util.math.MatrixStack matrices, int mouseX, int mouseY, float delta) Methods inherited from class net.minecraft.client.gui.screen.option.GameOptionsScreen
getHoveredButtonTooltip, onCloseMethods inherited from class net.minecraft.client.gui.screen.Screen
addDrawable, addDrawableChild, addElementNarrations, addScreenNarrations, addSelectableChild, applyKeyPressNarratorDelay, applyMouseMoveNarratorDelay, applyMousePressScrollNarratorDelay, applyNarratorModeChangeDelay, children, clearChildren, filesDragged, findSelectedElementData, getNarratedTitle, getTitle, getTooltipFromItem, handleTextClick, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, keyPressed, narrateScreenIfNarrationEnabled, remove, renderBackground, renderBackground, renderBackgroundTexture, renderOrderedTooltip, renderTextHoverEffect, renderTooltip, renderTooltip, renderTooltip, renderTooltip, resize, sendMessage, sendMessage, shouldCloseOnEsc, tick, updateNarrator, wrapScreenErrorMethods inherited from class net.minecraft.client.gui.AbstractParentElement
getFocused, isDragging, setDragging, setFocusedMethods inherited from class net.minecraft.client.gui.DrawableHelper
drawCenteredText, drawCenteredText, drawCenteredTextWithShadow, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, drawWithOutline, drawWithShadow, fill, fillGradient, fillGradient, fillGradient, getZOffset, setZOffsetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.Element
mouseMovedMethods inherited from interface net.minecraft.client.gui.ParentElement
changeFocus, charTyped, focusOn, hoveredElement, keyReleased, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, setInitialFocus
-
Field Details
-
manager
The config manager. Used to load and save the config. -
buttonList
protected net.minecraft.client.gui.widget.ButtonListWidget buttonListThe 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 screentitle- The title of the screenmanager- The config manager
-
-
Method Details
-
getOptions
The list of options that will be shown to the user when this screen is displayed.- Parameters:
config- The config- Returns:
- An array of
Option
-
init
protected void init()- Overrides:
initin classnet.minecraft.client.gui.screen.Screen
-
render
public void render(net.minecraft.client.util.math.MatrixStack matrices, int mouseX, int mouseY, float delta) - Specified by:
renderin interfacenet.minecraft.client.gui.Drawable- Overrides:
renderin classnet.minecraft.client.gui.screen.Screen
-
removed
public void removed()- Overrides:
removedin classnet.minecraft.client.gui.screen.option.GameOptionsScreen
-