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
info.u_team.u_team_core.gui.elements.UButton
info.u_team.u_team_core.gui.elements.AbstractSliderLogic
info.u_team.u_team_core.gui.elements.USlider
- 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
FieldsModifier and TypeFieldDescriptionprotected 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
ConstructorsConstructorDescriptionUSlider
(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 TypeMethodDescriptionprotected 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 info.u_team.u_team_core.gui.elements.UButton
getButtonColor, getDisabledTextColor, getTextColor, setButtonColor, setDisabledTextColor, setPressable, setPressable, setTextColor, setTooltip
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
-
WHITE
-
LIGHT_GRAY
-
isInContainer
protected final boolean isInContainer -
sliderBackgroundTextureProvider
-
sliderBackgroundColor
-
sliderTextureProvider
-
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
-
setSliderBackgroundColor
-
getSliderColor
-
setSliderColor
-
renderButton
public void renderButton(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTicks) - Overrides:
renderButton
in classUButton
-
renderBackground
public void renderBackground(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTicks) - Specified by:
renderBackground
in interfacePerspectiveRenderable
- Overrides:
renderBackground
in classUButton
-
renderForeground
public void renderForeground(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTicks) - Specified by:
renderForeground
in interfacePerspectiveRenderable
- Overrides:
renderForeground
in classUButton
-
renderToolTip
public void renderToolTip(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTicks) - Specified by:
renderToolTip
in interfaceTooltipRenderable
- Overrides:
renderToolTip
in classUButton
-
getCurrentBackgroundColor
public RGBA getCurrentBackgroundColor(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTicks) - Specified by:
getCurrentBackgroundColor
in interfaceBackgroundColorProvider
- Overrides:
getCurrentBackgroundColor
in classUButton
-
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 interfaceTextProvider
- Overrides:
getCurrentText
in classUButton
-
getCurrentTextColor
public RGBA getCurrentTextColor(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTicks) - Specified by:
getCurrentTextColor
in interfaceTextSettingsProvider
- Overrides:
getCurrentTextColor
in classUButton
-
onClick
public void onClick(double mouseX, double mouseY) - Overrides:
onClick
in classnet.minecraft.client.gui.components.AbstractButton
-
onDrag
protected void onDrag(double mouseX, double mouseY, double dragX, double dragY) - Overrides:
onDrag
in classnet.minecraft.client.gui.components.AbstractWidget
-
onRelease
public void onRelease(double mouseX, double mouseY) - Overrides:
onRelease
in classnet.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 classnet.minecraft.client.gui.components.AbstractWidget
-
keyPressed
public boolean keyPressed(int keyCode, int scanCode, int modifiers) - Specified by:
keyPressed
in interfacenet.minecraft.client.gui.components.events.GuiEventListener
- Overrides:
keyPressed
in classnet.minecraft.client.gui.components.AbstractButton
-
playDownSound
public void playDownSound(net.minecraft.client.sounds.SoundManager handler) - Overrides:
playDownSound
in classnet.minecraft.client.gui.components.AbstractWidget
-
changeSliderValue
protected void changeSliderValue(double mouseX) -
setSliderValue
protected void setSliderValue(double newValue)
-