Package net.uku3lig.ukulib.config.screen
Class PositionSelectScreen
java.lang.Object
net.minecraft.client.gui.DrawableHelper
net.minecraft.client.gui.AbstractParentElement
net.minecraft.client.gui.screen.Screen
net.uku3lig.ukulib.config.screen.PositionSelectScreen
- All Implemented Interfaces:
net.minecraft.client.gui.Drawable,net.minecraft.client.gui.Element,net.minecraft.client.gui.ParentElement
public abstract class PositionSelectScreen
extends net.minecraft.client.gui.screen.Screen
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.screen.Screen
net.minecraft.client.gui.screen.Screen.SelectedElementNarrationData -
Field Summary
Fields 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_TEXTUREFields inherited from interface net.minecraft.client.gui.Element
MAX_DOUBLE_CLICK_INTERVAL -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPositionSelectScreen(net.minecraft.client.gui.screen.Screen parent, int x, int y, ConfigManager<?> manager, BiConsumer<Integer, Integer> callback) Creates a position select screen. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected abstract voiddraw(net.minecraft.client.util.math.MatrixStack matrices, int mouseX, int mouseY, float delta, int x, int y) Draws the screen and all the components in it.protected voiddrawDefault(net.minecraft.client.util.math.MatrixStack matrices, int mouseX, int mouseY, float delta) Draws the screen and all the components in it, in their default position.protected voidinit()booleankeyPressed(int keyCode, int scanCode, int modifiers) booleanmouseClicked(double mouseX, double mouseY, int button) voidremoved()voidrender(net.minecraft.client.util.math.MatrixStack matrices, int mouseX, int mouseY, float delta) 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, getTitle, getTooltipFromItem, handleTextClick, hasAltDown, hasControlDown, hasShiftDown, hide, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, narrateScreenIfNarrationEnabled, remove, renderBackground, renderBackground, renderBackgroundTexture, renderOrderedTooltip, renderTextHoverEffect, renderTooltip, renderTooltip, renderTooltip, renderTooltip, renderWithTooltip, resize, setTooltip, setTooltip, setTooltip, setTooltip, shouldCloseOnEsc, shouldPause, tick, updateNarrator, wrapScreenErrorMethods inherited from class net.minecraft.client.gui.AbstractParentElement
getFocused, isDragging, setDragging, setFocusedMethods inherited from class net.minecraft.client.gui.DrawableHelper
disableScissor, drawCenteredText, drawCenteredText, drawCenteredTextWithShadow, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, drawWithOutline, drawWithShadow, enableScissor, 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, mouseDragged, mouseReleased, mouseScrolled, setInitialFocus
-
Constructor Details
-
PositionSelectScreen
protected PositionSelectScreen(net.minecraft.client.gui.screen.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:
parent- 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.screen.Screen
-
close
public void close()- Overrides:
closein classnet.minecraft.client.gui.screen.Screen
-
removed
public void removed()- Overrides:
removedin classnet.minecraft.client.gui.screen.Screen
-
mouseClicked
public boolean mouseClicked(double mouseX, double mouseY, int button) -
keyPressed
public boolean keyPressed(int keyCode, int scanCode, int modifiers) - Specified by:
keyPressedin interfacenet.minecraft.client.gui.Element- Specified by:
keyPressedin interfacenet.minecraft.client.gui.ParentElement- Overrides:
keyPressedin classnet.minecraft.client.gui.screen.Screen
-
draw
protected abstract void draw(net.minecraft.client.util.math.MatrixStack matrices, int mouseX, int mouseY, float delta, int x, int y) Draws the screen and all the components in it. Called inrender(MatrixStack, int, int, float).- Parameters:
matrices- The matrix stackmouseX- 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.util.math.MatrixStack matrices, int mouseX, int mouseY, float delta) Draws the screen and all the components in it, in their default position. Called inrender(MatrixStack, int, int, float).- Parameters:
matrices- The matrix stackmouseX- The x position of the mousemouseY- The y position of the mousedelta- The delta time
-
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
-