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.options.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.options.GameOptionsScreen
A screen used to edit a config.
Instances of this class should NOT be reused.
-
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.options.GameOptionsScreen
gameOptions, parentFields inherited from class net.minecraft.client.gui.screen.Screen
buttons, children, font, height, itemRenderer, minecraft, passEvents, title, widthFields inherited from class net.minecraft.client.gui.DrawableHelper
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION -
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.options.Option[]getOptions(T config) The list of options that will be shown to the user when this screen is displayed.protected voidinit()voidremoved()voidrender(int mouseX, int mouseY, float delta) Methods inherited from class net.minecraft.client.gui.screen.options.GameOptionsScreen
onCloseMethods inherited from class net.minecraft.client.gui.screen.Screen
addButton, children, getNarrationMessage, getTitle, getTooltipFromItem, handleComponentClicked, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, keyPressed, renderBackground, renderBackground, renderComponentHoverEffect, renderDirtBackground, renderTooltip, renderTooltip, renderTooltip, resize, sendMessage, sendMessage, setSize, shouldCloseOnEsc, tick, wrapScreenErrorMethods inherited from class net.minecraft.client.gui.AbstractParentElement
getFocused, isDragging, setDragging, setFocusedMethods inherited from class net.minecraft.client.gui.DrawableHelper
blit, blit, blit, blit, blit, drawCenteredString, drawRightAlignedString, drawString, fill, fill, fillGradient, getBlitOffset, hLine, innerBlit, setBlitOffset, vLineMethods 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(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.options.GameOptionsScreen
-