Class PositionSelectScreen
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.uku3lig.ukulib.config.screen.CloseableScreen
net.uku3lig.ukulib.config.screen.PositionSelectScreen
- All Implemented Interfaces:
net.minecraft.client.gui.components.events.ContainerEventHandler, net.minecraft.client.gui.components.events.GuiEventListener, net.minecraft.client.gui.components.Renderable, net.minecraft.client.gui.components.TabOrderedElement
Simple screen used to select a custom position on the screen for an element.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.Screen.NarratableSearchResult -
Field Summary
Fields inherited from class CloseableScreen
parentFields inherited from class net.minecraft.client.gui.screens.Screen
FADE_IN_TIME, font, FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, minecraft, narratorButton, screenExecutor, title, width -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPositionSelectScreen(String key, net.minecraft.client.gui.screens.Screen parent, int x, int y, ConfigManager<?> manager, BiConsumer<Integer, Integer> callback) Creates a position select screen. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voiddraw(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float delta, int x, int y) Draws the screen and all the components in it.protected voiddrawDefault(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float delta) Draws the screen and all the components in it, in their default position.voidextractRenderState(@NotNull net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float delta) protected voidinit()booleankeyPressed(@NotNull net.minecraft.client.input.KeyEvent input) booleanmouseClicked(@NotNull net.minecraft.client.input.MouseButtonEvent click, boolean doubleClick) voidremoved()protected voidMethods inherited from class CloseableScreen
onCloseMethods inherited from class net.minecraft.client.gui.screens.Screen
added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, canInterruptWithAnotherScreen, changeFocus, children, clearFocus, clearWidgets, clickCommandAction, clickUrlAction, defaultHandleClickEvent, defaultHandleGameClickEvent, extractBackground, extractBlurredBackground, extractMenuBackground, extractMenuBackground, extractMenuBackgroundTexture, extractPanorama, extractRenderStateWithTooltipAndSubtitles, extractTransparentBackground, fadeWidgets, findNarratableWidget, getBackgroundMusic, getFont, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleDelayedNarration, init, insertText, isAllowedInPortal, isInGameUi, isInputCaptured, isMouseOver, isPauseScreen, isValidCharacterForName, onFilesDrop, rebuildWidgets, removeWidget, resize, scheduleNarration, setInitialFocus, setInitialFocus, shouldCloseOnEsc, shouldNarrateNavigation, showsActiveEffects, tick, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, updateNarratorStatusMethods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocusedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
charTyped, getBorderForArrowNavigation, getChildAt, getCurrentFocusPath, isFocused, keyReleased, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, preeditUpdated, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
capturesInput, mouseMoved, shouldTakeFocusAfterInteractionMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Constructor Details
-
PositionSelectScreen
protected PositionSelectScreen(String key, net.minecraft.client.gui.screens.Screen parent, int x, int y, ConfigManager<?> manager, BiConsumer<Integer, Integer> callback) Creates a position select screen. If any ofxoryis passed as-1, the screen will use the default values.- Parameters:
key- The translation key of the titleparent- The parent screenx- The initial x positiony- The initial y positionmanager- The config manager, used to save the configcallback- The action to be performed when the position is changed
-
-
Method Details
-
init
protected void init()- Overrides:
initin classnet.minecraft.client.gui.screens.Screen
-
repositionElements
protected void repositionElements()- Overrides:
repositionElementsin classnet.minecraft.client.gui.screens.Screen
-
removed
public void removed()- Overrides:
removedin classnet.minecraft.client.gui.screens.Screen
-
mouseClicked
public boolean mouseClicked(@NotNull @NotNull net.minecraft.client.input.MouseButtonEvent click, boolean doubleClick) -
keyPressed
public boolean keyPressed(@NotNull @NotNull net.minecraft.client.input.KeyEvent input) - Specified by:
keyPressedin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Specified by:
keyPressedin interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
keyPressedin classnet.minecraft.client.gui.screens.Screen
-
draw
protected abstract void draw(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float delta, int x, int y) Draws the screen and all the components in it. Called inextractRenderState(GuiGraphicsExtractor, int, int, float).- Parameters:
graphics- The drawable helpermouseX- The x position of the mousemouseY- The y position of the mousedelta- The delta timex- The x position of the elementy- The y position of the element
-
drawDefault
protected void drawDefault(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float delta) Draws the screen and all the components in it, in their default position. Called inextractRenderState(GuiGraphicsExtractor, int, int, float).- Parameters:
graphics- The drawable helpermouseX- The x position of the mousemouseY- The y position of the mousedelta- The delta time
-
extractRenderState
public void extractRenderState(@NotNull @NotNull net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float delta) - Specified by:
extractRenderStatein interfacenet.minecraft.client.gui.components.Renderable- Overrides:
extractRenderStatein classnet.minecraft.client.gui.screens.Screen
-