Class ScrollInput

java.lang.Object
net.minecraft.client.gui.components.AbstractWidget
net.createmod.catnip.gui.widget.AbstractSimiWidget
com.simibubi.create.foundation.gui.widget.ScrollInput
All Implemented Interfaces:
net.createmod.catnip.gui.TickableGuiEventListener, net.minecraft.client.gui.components.events.GuiEventListener, net.minecraft.client.gui.components.Renderable, net.minecraft.client.gui.components.TabOrderedElement, net.minecraft.client.gui.layouts.LayoutElement, net.minecraft.client.gui.narration.NarratableEntry, net.minecraft.client.gui.narration.NarrationSupplier, net.neoforged.neoforge.client.extensions.IAbstractWidgetExtension
Direct Known Subclasses:
SelectionScrollInput

public class ScrollInput extends net.createmod.catnip.gui.widget.AbstractSimiWidget
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry

    net.minecraft.client.gui.narration.NarratableEntry.NarrationPriority
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Label
     
    protected Function<Integer,net.minecraft.network.chat.Component>
     
    protected net.minecraft.network.chat.Component
     
    protected boolean
     
    protected int
     
    protected int
     
    protected Consumer<Integer>
     
    protected final net.minecraft.network.chat.Component
     
    protected final net.minecraft.network.chat.Component
     
    protected int
     
    protected boolean
     
    protected int
     
    protected net.minecraft.network.chat.Component
     

    Fields inherited from class net.createmod.catnip.gui.widget.AbstractSimiWidget

    COLOR_CLICK, COLOR_DISABLED, COLOR_FAIL, COLOR_HOVER, COLOR_IDLE, COLOR_SUCCESS, HEADER_RGB, HINT_RGB, lockedTooltipX, lockedTooltipY, onClick, toolTip, wasHovered, z

    Fields inherited from class net.minecraft.client.gui.components.AbstractWidget

    active, alpha, height, isHovered, packedFGColor, UNSET_FG_COLOR, visible, width

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

    DOUBLE_CLICK_THRESHOLD_MS
  • Constructor Summary

    Constructors
    Constructor
    Description
    ScrollInput(int xIn, int yIn, int widthIn, int heightIn)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    addHint(net.minecraft.network.chat.MutableComponent hint)
     
     
    protected void
     
    format(Function<Integer,net.minecraft.network.chat.Component> formatter)
     
    int
     
     
    boolean
    mouseScrolled(double pMouseX, double pMouseY, double pScrollX, double pScrollY)
     
    void
     
     
    setState(int state)
     
     
    void
     
    titled(net.minecraft.network.chat.MutableComponent title)
     
    protected void
     
    withRange(int min, int max)
     
    withShiftStep(int step)
     
     
    protected void
     
     

    Methods inherited from class net.createmod.catnip.gui.widget.AbstractSimiWidget

    afterRender, atZLevel, beforeRender, clicked, doRender, getToolTip, onClick, render, renderTooltip, renderWidget, runCallback, setActive, setHeight, updateWidgetNarration, withCallback, withCallback

    Methods inherited from class net.minecraft.client.gui.components.AbstractWidget

    clearFGColor, createNarrationMessage, defaultButtonNarrationText, getBottom, getFGColor, getHeight, getMessage, getRectangle, getRight, getTabOrderGroup, getTooltip, getWidth, getX, getY, isActive, isFocused, isHovered, isHoveredOrFocused, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrationPriority, nextFocusPath, onDrag, onRelease, playDownSound, renderScrollingString, renderScrollingString, renderScrollingString, setAlpha, setFGColor, setFocused, setMessage, setRectangle, setSize, setTabOrderGroup, setTooltip, setTooltipDelay, setWidth, setX, setY, updateNarration, visitWidgets, wrapDefaultNarrationMessage

    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.GuiEventListener

    charTyped, getCurrentFocusPath, getRectangle, isFocused, isMouseOver, keyPressed, keyReleased, mouseClicked, mouseDragged, mouseMoved, mouseReleased, nextFocusPath, setFocused

    Methods inherited from interface net.neoforged.neoforge.client.extensions.IAbstractWidgetExtension

    onClick

    Methods inherited from interface net.minecraft.client.gui.layouts.LayoutElement

    setPosition

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

    getTabOrderGroup
  • Field Details

    • onScroll

      protected Consumer<Integer> onScroll
    • state

      protected int state
    • title

      protected net.minecraft.network.chat.Component title
    • scrollToModify

      protected final net.minecraft.network.chat.Component scrollToModify
    • shiftScrollsFaster

      protected final net.minecraft.network.chat.Component shiftScrollsFaster
    • hint

      protected net.minecraft.network.chat.Component hint
    • displayLabel

      protected Label displayLabel
    • inverted

      protected boolean inverted
    • soundPlayed

      protected boolean soundPlayed
    • formatter

      protected Function<Integer,net.minecraft.network.chat.Component> formatter
    • min

      protected int min
    • max

      protected int max
    • shiftStep

      protected int shiftStep
  • Constructor Details

    • ScrollInput

      public ScrollInput(int xIn, int yIn, int widthIn, int heightIn)
  • Method Details

    • standardStep

    • inverted

      public ScrollInput inverted()
    • withRange

      public ScrollInput withRange(int min, int max)
    • calling

      public ScrollInput calling(Consumer<Integer> onScroll)
    • format

      public ScrollInput format(Function<Integer,net.minecraft.network.chat.Component> formatter)
    • removeCallback

      public ScrollInput removeCallback()
    • titled

      public ScrollInput titled(net.minecraft.network.chat.MutableComponent title)
    • addHint

      public ScrollInput addHint(net.minecraft.network.chat.MutableComponent hint)
    • withStepFunction

    • writingTo

      public ScrollInput writingTo(Label label)
    • tick

      public void tick()
      Specified by:
      tick in interface net.createmod.catnip.gui.TickableGuiEventListener
      Overrides:
      tick in class net.createmod.catnip.gui.widget.AbstractSimiWidget
    • getState

      public int getState()
    • setState

      public ScrollInput setState(int state)
    • withShiftStep

      public ScrollInput withShiftStep(int step)
    • mouseScrolled

      public boolean mouseScrolled(double pMouseX, double pMouseY, double pScrollX, double pScrollY)
    • clampState

      protected void clampState()
    • onChanged

      public void onChanged()
    • writeToLabel

      protected void writeToLabel()
    • updateTooltip

      protected void updateTooltip()