Class AbstractConfigScreen
java.lang.Object
net.minecraft.client.gui.AbstractParentElement
net.minecraft.client.gui.screen.Screen
net.rodofire.easierworldcreator.client.hud.screen.BackgroundScreen
net.rodofire.easierworldcreator.config.client.AbstractConfigScreen
- 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:
DefaultConfigScreen
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.client.gui.screen.Screen
net.minecraft.client.gui.screen.Screen.SelectedElementNarrationData -
Field Summary
FieldsFields inherited from class net.rodofire.easierworldcreator.client.hud.screen.BackgroundScreen
TEXTUREFields inherited from class net.minecraft.client.gui.screen.Screen
client, executor, FOOTER_SEPARATOR_TEXTURE, HEADER_SEPARATOR_TEXTURE, height, INWORLD_FOOTER_SEPARATOR_TEXTURE, INWORLD_HEADER_SEPARATOR_TEXTURE, MENU_BACKGROUND_TEXTURE, narratorToggleButton, PANORAMA_RENDERER, ROTATING_PANORAMA_RENDERER, textRenderer, title, widthFields inherited from interface net.minecraft.client.gui.Element
MAX_DOUBLE_CLICK_INTERVAL -
Constructor Summary
ConstructorsModifierConstructorDescriptionAbstractConfigScreen(net.minecraft.util.Identifier background, int backgroundWidth, int backgroundHeight, int backgroundShaderColor, ModClientConfig config, String modId) AbstractConfigScreen(net.minecraft.util.Identifier background, int backgroundWidth, int backgroundHeight, ModClientConfig config, String modId) protectedAbstractConfigScreen(ModClientConfig config, String modId) -
Method Summary
Modifier and TypeMethodDescription<T extends AbstractInfoScreen>
InfoButtonWidgetaddInfoButton(int startX, int yOffset, T obj) <T extends AbstractConfigObject<U>,U>
ImageButtonWidgetaddResetButton(int startX, int yOffset, T obj) protected booleanvoidcycleEnum(EnumConfigObject configObject, net.minecraft.client.gui.widget.ButtonWidget button) method to change the actual value of an enum to the next valueprotected AbstractInfoScreengetInfoScreen(AbstractConfigObject<?> category) protected booleanhasInfoScreen(AbstractConfigObject<?> category) protected voidinit()protected abstract voidinit(ConfigCategory category) protected voidthis saves the configprotected booleanmethod to know if the game should restart in the case one or many config got changed that requires the game to restartprotected voidtoggleBoolean(BooleanConfigObject configObject, net.minecraft.client.gui.widget.ButtonWidget button) protected voidverifyInteger(IntegerConfigObject configObject, AbstractEntryWidget button, String cgr) Method to verify that the input is an integer and manage the addition of "-".Methods inherited from class net.rodofire.easierworldcreator.client.hud.screen.BackgroundScreen
render, renderBackground, renderBackgroundTexture, renderDarkRectangle, renderOverBackgroundMethods inherited from class net.minecraft.client.gui.screen.Screen
addCrashReportSection, addDrawable, addDrawableChild, addElementNarrations, addScreenNarrations, addSelectableChild, applyBlur, applyKeyPressNarratorDelay, applyMouseMoveNarratorDelay, applyMousePressScrollNarratorDelay, blur, children, clearAndInit, clearChildren, clearTooltip, close, findSelectedElementData, getMusic, getNarratedTitle, getNavigationFocus, getTextRenderer, getTitle, getTooltipFromItem, getUsageNarrationText, handleTextClick, hasAltDown, hasControlDown, hasShiftDown, hasUsageText, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, keyPressed, narrateScreenIfNarrationEnabled, onDisplayed, onFilesDropped, refreshNarrator, refreshWidgetPositions, remove, removed, renderBackgroundTexture, renderDarkening, renderDarkening, renderInGameBackground, renderPanoramaBackground, renderWithTooltip, resize, setInitialFocus, setInitialFocus, setTooltip, setTooltip, setTooltip, setTooltip, shouldCloseOnEsc, shouldHideStatusEffectHud, shouldPause, switchFocus, tick, updateNarratorMethods inherited from class net.minecraft.client.gui.AbstractParentElement
getFocused, isDragging, setDragging, setFocusedMethods 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
getBorder, mouseMovedMethods inherited from interface net.minecraft.client.gui.navigation.Navigable
getNavigationOrderMethods inherited from interface net.minecraft.client.gui.ParentElement
charTyped, getFocusedPath, getNavigationPath, hoveredElement, isFocused, keyReleased, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, setFocused
-
Field Details
-
selected
protected int selected -
modId
-
indexes
-
-
Constructor Details
-
AbstractConfigScreen
-
AbstractConfigScreen
public AbstractConfigScreen(net.minecraft.util.Identifier background, int backgroundWidth, int backgroundHeight, ModClientConfig config, String modId) -
AbstractConfigScreen
public AbstractConfigScreen(net.minecraft.util.Identifier background, int backgroundWidth, int backgroundHeight, int backgroundShaderColor, ModClientConfig config, String modId)
-
-
Method Details
-
init
protected void init()- Overrides:
initin classnet.minecraft.client.gui.screen.Screen
-
init
-
addResetButton
public <T extends AbstractConfigObject<U>,U> ImageButtonWidget addResetButton(int startX, int yOffset, T obj) -
addInfoButton
public <T extends AbstractInfoScreen> InfoButtonWidget addInfoButton(int startX, int yOffset, T obj) -
hasInfoScreen
-
getInfoScreen
-
toggleBoolean
protected void toggleBoolean(BooleanConfigObject configObject, net.minecraft.client.gui.widget.ButtonWidget button) -
cycleEnum
public void cycleEnum(EnumConfigObject configObject, net.minecraft.client.gui.widget.ButtonWidget button) method to change the actual value of an enum to the next value- Parameters:
configObject- the enum that will be cycledbutton- the button on which the enum appears
-
verifyInteger
protected void verifyInteger(IntegerConfigObject configObject, AbstractEntryWidget button, String cgr) Method to verify that the input is an integer and manage the addition of "-". It also manage the color of the text- Parameters:
configObject- the config object that will be verifiedbutton- the entry that is usedcgr- the text
-
configEquals
protected boolean configEquals() -
saveConfig
protected void saveConfig()this saves the config -
shouldRestart
protected boolean shouldRestart()method to know if the game should restart in the case one or many config got changed that requires the game to restart- Returns:
- true if the game should restart
- false if not
-