Class PositionSelectScreen

java.lang.Object
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.navigation.Navigable, net.minecraft.client.gui.ParentElement

public abstract class PositionSelectScreen extends CloseableScreen
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.uku3lig.ukulib.config.screen.CloseableScreen

    parent

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

    client, executor, FOOTER_SEPARATOR_TEXTURE, HEADER_SEPARATOR_TEXTURE, height, INWORLD_FOOTER_SEPARATOR_TEXTURE, INWORLD_HEADER_SEPARATOR_TEXTURE, MENU_BACKGROUND_TEXTURE, PANORAMA_RENDERER, ROTATING_PANORAMA_RENDERER, textRenderer, title, width

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

    MAX_DOUBLE_CLICK_INTERVAL
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    PositionSelectScreen(String key, 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
    protected abstract void
    draw(net.minecraft.client.gui.DrawContext drawContext, int mouseX, int mouseY, float delta, int x, int y)
    Draws the screen and all the components in it.
    protected void
    drawDefault(net.minecraft.client.gui.DrawContext drawContext, int mouseX, int mouseY, float delta)
    Draws the screen and all the components in it, in their default position.
    protected void
     
    boolean
    keyPressed(int keyCode, int scanCode, int modifiers)
     
    boolean
    mouseClicked(double mouseX, double mouseY, int button)
     
    void
     
    void
    render(net.minecraft.client.gui.DrawContext drawContext, int mouseX, int mouseY, float delta)
     

    Methods inherited from class net.uku3lig.ukulib.config.screen.CloseableScreen

    close

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

    addDrawable, addDrawableChild, addElementNarrations, addScreenNarrations, addSelectableChild, applyBlur, applyKeyPressNarratorDelay, applyMouseMoveNarratorDelay, applyMousePressScrollNarratorDelay, applyNarratorModeChangeDelay, blur, children, clearAndInit, clearChildren, clearTooltip, filesDragged, findSelectedElementData, getMusic, getNarratedTitle, getNavigationFocus, getPanoramaTickDelta, getTitle, getTooltipFromItem, getUsageNarrationText, handleTextClick, hasAltDown, hasControlDown, hasShiftDown, hasUsageText, init, initTabNavigation, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, narrateScreenIfNarrationEnabled, onDisplayed, remove, renderBackground, renderBackgroundTexture, renderDarkening, renderDarkening, renderInGameBackground, renderPanoramaBackground, renderWithTooltip, resize, setInitialFocus, setInitialFocus, setTooltip, setTooltip, setTooltip, setTooltip, shouldCloseOnEsc, shouldPause, switchFocus, tick, updateNarrator, wrapScreenError

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

    getFocused, isDragging, setDragging, setFocused

    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.navigation.Navigable

    getNavigationOrder

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

    charTyped, getFocusedPath, getNavigationPath, hoveredElement, isFocused, keyReleased, mouseDragged, mouseReleased, mouseScrolled, setFocused
  • Constructor Details

    • PositionSelectScreen

      protected PositionSelectScreen(String key, net.minecraft.client.gui.screen.Screen parent, int x, int y, ConfigManager<?> manager, BiConsumer<Integer,Integer> callback)
      Creates a position select screen. If any of x or y is passed as -1, the screen will use the default values.
      Parameters:
      key - The translation key of the title
      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
    • 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

      protected abstract void draw(net.minecraft.client.gui.DrawContext drawContext, int mouseX, int mouseY, float delta, int x, int y)
      Draws the screen and all the components in it. Called in render(DrawContext, int, int, float).
      Parameters:
      drawContext - The drawable helper
      mouseX - The x position of the mouse
      mouseY - The y position of the mouse
      delta - The delta time
      x - The x position of the element
      y - The y position of the element
    • drawDefault

      protected void drawDefault(net.minecraft.client.gui.DrawContext drawContext, int mouseX, int mouseY, float delta)
      Draws the screen and all the components in it, in their default position. Called in render(DrawContext, int, int, float).
      Parameters:
      drawContext - The drawable helper
      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.gui.DrawContext drawContext, 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