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
    Modifier and Type
    Field
    Description
    protected int
    The x position of the element.
    protected int
    The y position of the element.

    Fields inherited from class net.minecraft.client.gui.screen.Screen

    client, height, itemRenderer, passEvents, textRenderer, title, width

    Fields inherited from class net.minecraft.client.gui.DrawableHelper

    GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE

    Fields inherited from interface net.minecraft.client.gui.Element

    MAX_DOUBLE_CLICK_INTERVAL
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    PositionSelectScreen(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 Type
    Method
    Description
    void
     
    abstract void
    draw(net.minecraft.client.util.math.MatrixStack matrices, int mouseX, int mouseY, float delta)
    Draws the screen and all the components in it.
    protected void
     
    boolean
    keyPressed(int keyCode, int scanCode, int modifiers)
     
    boolean
    mouseClicked(double mouseX, double mouseY, int button)
     
    void
     
    void
    render(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, wrapScreenError

    Methods inherited from class net.minecraft.client.gui.AbstractParentElement

    getFocused, isDragging, setDragging, setFocused

    Methods 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, setZOffset

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.client.gui.Element

    mouseMoved

    Methods inherited from interface net.minecraft.client.gui.ParentElement

    changeFocus, charTyped, focusOn, hoveredElement, keyReleased, mouseDragged, mouseReleased, mouseScrolled, setInitialFocus
  • Field Details

    • x

      protected int x
      The x position of the element.
    • y

      protected int y
      The 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 screen
      x - The initial x position
      y - The initial y position
      manager - The config manager, used to save the config
      callback - The action to be performed when the position is changed
  • Method Details

    • init

      protected void init()
      Overrides:
      init in class net.minecraft.client.gui.screen.Screen
    • close

      public void close()
      Overrides:
      close in class net.minecraft.client.gui.screen.Screen
    • removed

      public void removed()
      Overrides:
      removed in class net.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:
      keyPressed in interface net.minecraft.client.gui.Element
      Specified by:
      keyPressed in interface net.minecraft.client.gui.ParentElement
      Overrides:
      keyPressed in class net.minecraft.client.gui.screen.Screen
    • draw

      public abstract void draw(net.minecraft.client.util.math.MatrixStack matrices, int mouseX, int mouseY, float delta)
      Draws the screen and all the components in it. Called in render(MatrixStack, int, int, float).
      Parameters:
      matrices - The matrix stack
      mouseX - The x position of the mouse
      mouseY - The y position of the mouse
      delta - The delta time
    • render

      public void render(net.minecraft.client.util.math.MatrixStack matrices, int mouseX, int mouseY, float delta)
      Specified by:
      render in interface net.minecraft.client.gui.Drawable
      Overrides:
      render in class net.minecraft.client.gui.screen.Screen