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.CloseableScreen
net.uku3lig.ukulib.config.screen.PositionSelectScreen
- All Implemented Interfaces:
net.minecraft.client.gui.Drawable,net.minecraft.client.gui.Element,net.minecraft.client.gui.ParentElement,net.minecraft.client.gui.screen.TickableElement
Simple screen used to select a custom position on the screen for an element.
-
Field Summary
Fields inherited from class net.uku3lig.ukulib.config.screen.CloseableScreen
parentFields inherited from class net.minecraft.client.gui.screen.Screen
buttons, children, 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
ConstructorsModifierConstructorDescriptionprotectedPositionSelectScreen(net.minecraft.client.gui.screen.Screen parent, int x, int y, ConfigManager<?> manager, BiConsumer<Integer, Integer> callback) Deprecated.use the other constructorprotectedPositionSelectScreen(net.minecraft.text.Text title, 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 TypeMethodDescriptionprotected 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) voidonClose()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
addButton, addChild, children, filesDragged, getNarrationMessage, getTitle, getTooltipFromItem, handleTextClick, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, renderBackground, renderBackground, renderBackgroundTexture, renderOrderedTooltip, renderTextHoverEffect, renderTooltip, renderTooltip, renderTooltip, resize, sendMessage, sendMessage, shouldCloseOnEsc, tick, wrapScreenErrorMethods inherited from class net.minecraft.client.gui.AbstractParentElement
getFocused, isDragging, setDragging, setFocusedMethods inherited from class net.minecraft.client.gui.DrawableHelper
drawCenteredText, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, 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
@Deprecated(since="0.5") protected PositionSelectScreen(net.minecraft.client.gui.screen.Screen parent, int x, int y, ConfigManager<?> manager, BiConsumer<Integer, Integer> callback) Deprecated.use the other constructorCreates 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
-
PositionSelectScreen
protected PositionSelectScreen(net.minecraft.text.Text title, 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:
title- The screen's 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.screen.Screen
-
onClose
public void onClose()- Overrides:
onClosein classCloseableScreen
-
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
-