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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intThe x position of the element.protected intThe y position of the element.Fields 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
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 TypeMethodDescriptionabstract voiddraw(int mouseX, int mouseY, float delta) Draws the screen and all the components in it.protected voidinit()booleankeyPressed(int keyCode, int scanCode, int modifiers) booleanmouseClicked(double mouseX, double mouseY, int button) voidonClose()voidremoved()voidrender(int mouseX, int mouseY, float delta) Methods 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, 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, mouseDragged, mouseReleased, mouseScrolled, setInitialFocus
-
Field Details
-
x
protected int xThe x position of the element. -
y
protected int yThe y position of the element.
-
-
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.- 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
-
onClose
public void onClose()- Overrides:
onClosein 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
public abstract void draw(int mouseX, int mouseY, float delta) Draws the screen and all the components in it. Called inrender(int, int, float).- Parameters:
mouseX- The x position of the mousemouseY- The y position of the mousedelta- The delta time
-
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
-