Class USlider

java.lang.Object
net.minecraft.client.gui.GuiComponent
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.AbstractButton
net.minecraft.client.gui.components.Button
All Implemented Interfaces:
BackgroundColorProvider, PerspectiveRenderable, TextProvider, TextSettingsProvider, TooltipRenderable, net.minecraft.client.gui.components.events.GuiEventListener, net.minecraft.client.gui.components.Widget, net.minecraft.client.gui.narration.NarratableEntry, net.minecraft.client.gui.narration.NarrationSupplier
Direct Known Subclasses:
ScalableSlider

public non-sealed class USlider extends AbstractSliderLogic implements PerspectiveRenderable, BackgroundColorProvider, TextProvider
  • Nested Class Summary

    Nested classes/interfaces inherited from class info.u_team.u_team_core.gui.elements.AbstractSliderLogic

    AbstractSliderLogic.OnSliderChange

    Nested classes/interfaces inherited from class net.minecraft.client.gui.components.Button

    net.minecraft.client.gui.components.Button.OnPress, net.minecraft.client.gui.components.Button.OnTooltip

    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 static final AbstractSliderLogic.OnSliderChange
     
    protected final boolean
     
    protected static final RGBA
     
    protected RGBA
     
    protected TextureProvider
     
    protected RGBA
     
    protected TextureProvider
     
    protected static final RGBA
     

    Fields inherited from class info.u_team.u_team_core.gui.elements.AbstractSliderLogic

    decimalPrecision, dragging, drawDescription, maxValue, minValue, precision, prefix, slider, suffix, value

    Fields inherited from class info.u_team.u_team_core.gui.elements.UButton

    buttonColor, buttonTextureProvider, disabledTextColor, EMPTY_TOOLTIP, EMTPY_PRESSABLE, textColor

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

    DEFAULT_HEIGHT, DEFAULT_WIDTH, NO_TOOLTIP, onPress, onTooltip, SMALL_WIDTH

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

    active, alpha, height, isHovered, packedFGColor, UNSET_FG_COLOR, visible, WIDGETS_LOCATION, width, x, y

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

    BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION

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

    DOUBLE_CLICK_THRESHOLD_MS
  • Constructor Summary

    Constructors
    Constructor
    Description
    USlider(int x, int y, int width, int height, net.minecraft.network.chat.Component prefix, net.minecraft.network.chat.Component suffix, double minValue, double maxValue, double value, boolean decimalPrecision, boolean drawDescription, boolean isInContainer)
     
    USlider(int x, int y, int width, int height, net.minecraft.network.chat.Component prefix, net.minecraft.network.chat.Component suffix, double minValue, double maxValue, double value, boolean decimalPrecision, boolean drawDescription, boolean isInContainer, AbstractSliderLogic.OnSliderChange slider)
     
    USlider(int x, int y, int width, int height, net.minecraft.network.chat.Component prefix, net.minecraft.network.chat.Component suffix, double minValue, double maxValue, double value, boolean decimalPrecision, boolean drawDescription, boolean isInContainer, AbstractSliderLogic.OnSliderChange slider, net.minecraft.client.gui.components.Button.OnTooltip tooltip)
     
    USlider(int x, int y, int width, int height, net.minecraft.network.chat.Component prefix, net.minecraft.network.chat.Component suffix, double minValue, double maxValue, double value, boolean decimalPrecision, boolean drawDescription, boolean isInContainer, net.minecraft.client.gui.components.Button.OnTooltip tooltip)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    changeSliderValue(double mouseX)
     
    getCurrentBackgroundColor(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTicks)
     
    getCurrentSliderColor(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTicks)
     
    net.minecraft.network.chat.Component
     
    getCurrentTextColor(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTicks)
     
     
     
    boolean
    keyPressed(int keyCode, int scanCode, int modifiers)
     
    void
    onClick(double mouseX, double mouseY)
     
    protected void
    onDrag(double mouseX, double mouseY, double dragX, double dragY)
     
    void
    onRelease(double mouseX, double mouseY)
     
    void
    playDownSound(net.minecraft.client.sounds.SoundManager handler)
     
    void
    renderBackground(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTicks)
     
    protected void
    renderBg(com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.Minecraft minecraft, int mouseX, int mouseY)
     
    void
    renderButton(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTicks)
     
    void
    renderForeground(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTicks)
     
    void
    renderToolTip(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTicks)
     
    void
    setSliderBackgroundColor(RGBA sliderBackgroundColor)
     
    void
    setSliderColor(RGBA sliderColor)
     
    protected void
    setSliderValue(double newValue)
     

    Methods inherited from class info.u_team.u_team_core.gui.elements.AbstractSliderLogic

    getValue, getValueInt, setSlider, setSlider, setValue, updateSlider

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

    onPress, renderToolTip, updateNarration

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

    changeFocus, clearFGColor, clicked, createNarrationMessage, defaultButtonNarrationText, getFGColor, getHeight, getMessage, getWidth, getYImage, isActive, isFocused, isHoveredOrFocused, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrationPriority, onFocusedChanged, render, setAlpha, setFGColor, setFocused, setHeight, setMessage, setWidth, wrapDefaultNarrationMessage

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

    blit, blit, blit, blit, blit, blitOutlineBlack, disableScissor, drawCenteredString, drawCenteredString, drawCenteredString, drawString, drawString, drawString, enableScissor, fill, fillGradient, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, vLine

    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, keyReleased, mouseMoved, mouseScrolled

    Methods inherited from interface info.u_team.u_team_core.api.gui.PerspectiveRenderable

    render

    Methods inherited from interface info.u_team.u_team_core.api.gui.TextSettingsProvider

    getCurrentTextFont
  • Field Details

    • EMPTY_SLIDER

      protected static final AbstractSliderLogic.OnSliderChange EMPTY_SLIDER
    • WHITE

      protected static final RGBA WHITE
    • LIGHT_GRAY

      protected static final RGBA LIGHT_GRAY
    • isInContainer

      protected final boolean isInContainer
    • sliderBackgroundTextureProvider

      protected TextureProvider sliderBackgroundTextureProvider
    • sliderBackgroundColor

      protected RGBA sliderBackgroundColor
    • sliderTextureProvider

      protected TextureProvider sliderTextureProvider
    • sliderColor

      protected RGBA sliderColor
  • Constructor Details

    • USlider

      public USlider(int x, int y, int width, int height, net.minecraft.network.chat.Component prefix, net.minecraft.network.chat.Component suffix, double minValue, double maxValue, double value, boolean decimalPrecision, boolean drawDescription, boolean isInContainer)
    • USlider

      public USlider(int x, int y, int width, int height, net.minecraft.network.chat.Component prefix, net.minecraft.network.chat.Component suffix, double minValue, double maxValue, double value, boolean decimalPrecision, boolean drawDescription, boolean isInContainer, AbstractSliderLogic.OnSliderChange slider)
    • USlider

      public USlider(int x, int y, int width, int height, net.minecraft.network.chat.Component prefix, net.minecraft.network.chat.Component suffix, double minValue, double maxValue, double value, boolean decimalPrecision, boolean drawDescription, boolean isInContainer, net.minecraft.client.gui.components.Button.OnTooltip tooltip)
    • USlider

      public USlider(int x, int y, int width, int height, net.minecraft.network.chat.Component prefix, net.minecraft.network.chat.Component suffix, double minValue, double maxValue, double value, boolean decimalPrecision, boolean drawDescription, boolean isInContainer, AbstractSliderLogic.OnSliderChange slider, net.minecraft.client.gui.components.Button.OnTooltip tooltip)
  • Method Details

    • getSliderBackgroundColor

      public RGBA getSliderBackgroundColor()
    • setSliderBackgroundColor

      public void setSliderBackgroundColor(RGBA sliderBackgroundColor)
    • getSliderColor

      public RGBA getSliderColor()
    • setSliderColor

      public void setSliderColor(RGBA sliderColor)
    • renderButton

      public void renderButton(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTicks)
      Overrides:
      renderButton in class UButton
    • renderBackground

      public void renderBackground(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTicks)
      Specified by:
      renderBackground in interface PerspectiveRenderable
      Overrides:
      renderBackground in class UButton
    • renderForeground

      public void renderForeground(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTicks)
      Specified by:
      renderForeground in interface PerspectiveRenderable
      Overrides:
      renderForeground in class UButton
    • renderToolTip

      public void renderToolTip(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTicks)
      Specified by:
      renderToolTip in interface TooltipRenderable
      Overrides:
      renderToolTip in class UButton
    • getCurrentBackgroundColor

      public RGBA getCurrentBackgroundColor(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTicks)
      Specified by:
      getCurrentBackgroundColor in interface BackgroundColorProvider
      Overrides:
      getCurrentBackgroundColor in class UButton
    • getCurrentSliderColor

      public RGBA getCurrentSliderColor(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTicks)
    • getCurrentText

      public net.minecraft.network.chat.Component getCurrentText()
      Specified by:
      getCurrentText in interface TextProvider
      Overrides:
      getCurrentText in class UButton
    • getCurrentTextColor

      public RGBA getCurrentTextColor(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTicks)
      Specified by:
      getCurrentTextColor in interface TextSettingsProvider
      Overrides:
      getCurrentTextColor in class UButton
    • onClick

      public void onClick(double mouseX, double mouseY)
      Overrides:
      onClick in class net.minecraft.client.gui.components.AbstractButton
    • onDrag

      protected void onDrag(double mouseX, double mouseY, double dragX, double dragY)
      Overrides:
      onDrag in class net.minecraft.client.gui.components.AbstractWidget
    • onRelease

      public void onRelease(double mouseX, double mouseY)
      Overrides:
      onRelease in class net.minecraft.client.gui.components.AbstractWidget
    • renderBg

      protected void renderBg(com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.Minecraft minecraft, int mouseX, int mouseY)
      Overrides:
      renderBg in class net.minecraft.client.gui.components.AbstractWidget
    • keyPressed

      public boolean keyPressed(int keyCode, int scanCode, int modifiers)
      Specified by:
      keyPressed in interface net.minecraft.client.gui.components.events.GuiEventListener
      Overrides:
      keyPressed in class net.minecraft.client.gui.components.AbstractButton
    • playDownSound

      public void playDownSound(net.minecraft.client.sounds.SoundManager handler)
      Overrides:
      playDownSound in class net.minecraft.client.gui.components.AbstractWidget
    • changeSliderValue

      protected void changeSliderValue(double mouseX)
    • setSliderValue

      protected void setSliderValue(double newValue)