Class PositionSelectScreen

java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.uku3lig.ukulib.config.screen.CloseableScreen
net.uku3lig.ukulib.config.screen.PositionSelectScreen
All Implemented Interfaces:
net.minecraft.client.gui.components.events.ContainerEventHandler, net.minecraft.client.gui.components.events.GuiEventListener, net.minecraft.client.gui.components.Renderable, net.minecraft.client.gui.components.TabOrderedElement

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.screens.Screen

    net.minecraft.client.gui.screens.Screen.NarratableSearchResult
  • Field Summary

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

    parent

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

    FADE_IN_TIME, font, FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, minecraft, narratorButton, screenExecutor, title, width
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    PositionSelectScreen(String key, net.minecraft.client.gui.screens.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.GuiGraphics graphics, 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.GuiGraphics graphics, int mouseX, int mouseY, float delta)
    Draws the screen and all the components in it, in their default position.
    protected void
     
    boolean
    keyPressed(@NotNull net.minecraft.client.input.KeyEvent input)
     
    boolean
    mouseClicked(@NotNull net.minecraft.client.input.MouseButtonEvent click, boolean doubleClick)
     
    void
     
    void
    render(@NotNull net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float delta)
     
    protected void
     

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

    onClose

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

    added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, canInterruptWithAnotherScreen, changeFocus, children, clearFocus, clearWidgets, clickCommandAction, clickUrlAction, defaultHandleClickEvent, defaultHandleGameClickEvent, fadeWidgets, fillCrashDetails, findNarratableWidget, getBackgroundMusic, getFont, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleDelayedNarration, init, insertText, isAllowedInPortal, isInGameUi, isMouseOver, isPauseScreen, isValidCharacterForName, onFilesDrop, panoramaShouldSpin, rebuildWidgets, removeWidget, renderBackground, renderBlurredBackground, renderMenuBackground, renderMenuBackground, renderMenuBackgroundTexture, renderPanorama, renderTransparentBackground, renderWithTooltipAndSubtitles, resize, setInitialFocus, setInitialFocus, shouldCloseOnEsc, shouldNarrateNavigation, showsActiveEffects, tick, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, updateNarratorStatus

    Methods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler

    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.components.events.ContainerEventHandler

    charTyped, getChildAt, getCurrentFocusPath, isFocused, keyReleased, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, setFocused

    Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener

    getBorderForArrowNavigation, mouseMoved, shouldTakeFocusAfterInteraction

    Methods inherited from interface net.minecraft.client.gui.components.TabOrderedElement

    getTabOrderGroup
  • Constructor Details

    • PositionSelectScreen

      protected PositionSelectScreen(String key, net.minecraft.client.gui.screens.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.screens.Screen
    • repositionElements

      protected void repositionElements()
      Overrides:
      repositionElements in class net.minecraft.client.gui.screens.Screen
    • removed

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

      public boolean mouseClicked(@NotNull @NotNull net.minecraft.client.input.MouseButtonEvent click, boolean doubleClick)
    • keyPressed

      public boolean keyPressed(@NotNull @NotNull net.minecraft.client.input.KeyEvent input)
      Specified by:
      keyPressed in interface net.minecraft.client.gui.components.events.ContainerEventHandler
      Specified by:
      keyPressed in interface net.minecraft.client.gui.components.events.GuiEventListener
      Overrides:
      keyPressed in class net.minecraft.client.gui.screens.Screen
    • draw

      protected abstract void draw(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float delta, int x, int y)
      Draws the screen and all the components in it. Called in render(GuiGraphics, int, int, float).
      Parameters:
      graphics - 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.GuiGraphics graphics, int mouseX, int mouseY, float delta)
      Draws the screen and all the components in it, in their default position. Called in render(GuiGraphics, int, int, float).
      Parameters:
      graphics - 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(@NotNull @NotNull net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float delta)
      Specified by:
      render in interface net.minecraft.client.gui.components.Renderable
      Overrides:
      render in class net.minecraft.client.gui.screens.Screen