Class OptionInstance.OptionInstanceSliderButton<N>
java.lang.Object
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.AbstractWidget.WithInactiveMessage
net.minecraft.client.gui.components.AbstractSliderButton
net.minecraft.client.gui.components.AbstractOptionSliderButton
net.minecraft.client.OptionInstance.OptionInstanceSliderButton<N>
- All Implemented Interfaces:
GuiEventListener, Renderable, ResettableOptionWidget, TabOrderedElement, LayoutElement, NarratableEntry, NarrationSupplier
- Enclosing class:
OptionInstance<T>
public static final class OptionInstance.OptionInstanceSliderButton<N>
extends AbstractOptionSliderButton
implements ResettableOptionWidget
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractWidget
AbstractWidget.WithInactiveMessageNested classes/interfaces inherited from interface NarratableEntry
NarratableEntry.NarrationPriority -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanprivate @Nullable Longprivate final OptionInstance<N> private final OptionInstance.TooltipSupplier<N> private final OptionInstance.SliderableValueSet<N> Fields inherited from class AbstractOptionSliderButton
optionsFields inherited from class AbstractSliderButton
canChangeValue, DEFAULT_HEIGHT, dragging, HANDLE_WIDTH, TEXT_MARGIN, valueFields inherited from class AbstractWidget
active, alpha, height, isHovered, message, packedFGColor, UNSET_FG_COLOR, visible, width -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateOptionInstanceSliderButton(Options options, int x, int y, int width, int height, OptionInstance<N> instance, OptionInstance.SliderableValueSet<N> values, OptionInstance.TooltipSupplier<N> tooltipSupplier, Consumer<N> onValueChanged, boolean applyValueImmediately) -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected voidbooleankeyPressed(KeyEvent event) voidonRelease(MouseButtonEvent event) voidrenderWidget(GuiGraphics graphics, int mouseX, int mouseY, float a) voidprotected voidMethods inherited from class AbstractSliderButton
createNarrationMessage, getHandleSprite, getSprite, onClick, onDrag, playDownSound, setFocused, setValue, updateWidgetNarrationMethods inherited from class AbstractWidget.WithInactiveMessage
defaultInactiveMessage, getMessage, setMessageMethods inherited from class AbstractWidget
clearFGColor, defaultButtonNarrationText, getAlpha, getBottom, getFGColor, getHeight, getRectangle, getRight, getTabOrderGroup, getWidth, getX, getY, handleCursor, isActive, isFocused, isHovered, isHoveredOrFocused, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrationPriority, nextFocusPath, playButtonClickSound, render, renderScrollingStringOverContents, setAlpha, setFGColor, setHeight, setRectangle, setSize, setTabOrderGroup, setTooltip, setTooltipDelay, setWidth, setX, setY, updateNarration, visitWidgets, wrapDefaultNarrationMessageMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface GuiEventListener
charTyped, getBorderForArrowNavigation, getCurrentFocusPath, keyReleased, mouseMoved, mouseScrolled, shouldTakeFocusAfterInteractionMethods inherited from interface LayoutElement
setPositionMethods inherited from interface NarratableEntry
getNarratables
-
Field Details
-
instance
-
values
-
tooltipSupplier
-
onValueChanged
-
delayedApplyAt
-
applyValueImmediately
private final boolean applyValueImmediately
-
-
Constructor Details
-
OptionInstanceSliderButton
private OptionInstanceSliderButton(Options options, int x, int y, int width, int height, OptionInstance<N> instance, OptionInstance.SliderableValueSet<N> values, OptionInstance.TooltipSupplier<N> tooltipSupplier, Consumer<N> onValueChanged, boolean applyValueImmediately)
-
-
Method Details
-
updateMessage
protected void updateMessage()- Specified by:
updateMessagein classAbstractSliderButton
-
applyValue
protected void applyValue()- Specified by:
applyValuein classAbstractSliderButton
-
applyUnsavedValue
public void applyUnsavedValue() -
resetValue
public void resetValue()- Specified by:
resetValuein interfaceResettableOptionWidget
-
renderWidget
- Overrides:
renderWidgetin classAbstractSliderButton
-
onRelease
- Overrides:
onReleasein classAbstractSliderButton
-
keyPressed
- Specified by:
keyPressedin interfaceGuiEventListener- Overrides:
keyPressedin classAbstractSliderButton
-