类 CycleButton<T>
java.lang.Object
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.AbstractButton
net.minecraft.client.gui.components.CycleButton<T>
- 所有已实现的接口:
GuiEventListener
,Renderable
,TabOrderedElement
,LayoutElement
,NarratableEntry
,NarrationSupplier
,IAbstractWidgetExtension
-
嵌套类概要
嵌套类修饰符和类型类说明static class
static interface
static interface
从接口继承的嵌套类/接口 net.minecraft.client.gui.narration.NarratableEntry
NarratableEntry.NarrationPriority
-
字段概要
字段修饰符和类型字段说明static final BooleanSupplier
private final boolean
private int
private final Component
private final Function<CycleButton<T>,
MutableComponent> private final CycleButton.OnValueChange<T>
private final OptionInstance.TooltipSupplier<T>
private T
private final CycleButton.ValueListSupplier<T>
从类继承的字段 net.minecraft.client.gui.components.AbstractButton
TEXT_MARGIN, TEXTURE_BORDER_X, TEXTURE_BORDER_Y, TEXTURE_HEIGHT, TEXTURE_WIDTH, TEXTURE_Y_OFFSET
从类继承的字段 net.minecraft.client.gui.components.AbstractWidget
ACCESSIBILITY_TEXTURE, active, alpha, height, isHovered, packedFGColor, UNSET_FG_COLOR, visible, WIDGETS_LOCATION, width
从接口继承的字段 net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
构造器概要
构造器构造器说明CycleButton
(int pX, int pY, int pWidth, int pHeight, Component pMessage, Component pName, int pIndex, T pValue, CycleButton.ValueListSupplier<T> pValues, Function<T, Component> pValueStringifier, Function<CycleButton<T>, MutableComponent> pNarrationProvider, CycleButton.OnValueChange<T> pOnValueChange, OptionInstance.TooltipSupplier<T> pTooltipSupplier, boolean pDisplayOnlyValue) -
方法概要
修饰符和类型方法说明static CycleButton.Builder<Boolean>
booleanBuilder
(Component pComponentOn, Component pComponentOff) static <T> CycleButton.Builder<T>
private MutableComponent
createFullName
(T pValue) private Component
createLabelForValue
(T pValue) protected MutableComponent
private void
cycleValue
(int pDelta) private T
getCycledValue
(int pDelta) getValue()
boolean
mouseScrolled
(double pMouseX, double pMouseY, double pDelta) static CycleButton.Builder<Boolean>
static CycleButton.Builder<Boolean>
onOffBuilder
(boolean pInitialValue) void
onPress()
void
private void
private void
updateValue
(T pValue) void
updateWidgetNarration
(NarrationElementOutput pNarrationElementOutput) 从类继承的方法 net.minecraft.client.gui.components.AbstractButton
keyPressed, onClick, renderString, renderWidget
从类继承的方法 net.minecraft.client.gui.components.AbstractWidget
clearFGColor, clicked, createTooltipPositioner, defaultButtonNarrationText, getFGColor, getHeight, getMessage, getRectangle, getTabOrderGroup, getTooltip, getWidth, getX, getY, isActive, isFocused, isHovered, isHoveredOrFocused, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrationPriority, nextFocusPath, onDrag, onRelease, playDownSound, render, renderScrollingString, renderScrollingString, renderTexture, setAlpha, setFGColor, setFocused, setHeight, setMessage, setTabOrderGroup, setTooltip, setTooltipDelay, setWidth, setX, setY, updateNarration, visitWidgets, wrapDefaultNarrationMessage
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 net.minecraft.client.gui.components.events.GuiEventListener
charTyped, getCurrentFocusPath, keyReleased, mouseMoved
从接口继承的方法 net.minecraftforge.client.extensions.IAbstractWidgetExtension
onClick
从接口继承的方法 net.minecraft.client.gui.layouts.LayoutElement
setPosition
-
字段详细资料
-
DEFAULT_ALT_LIST_SELECTOR
-
BOOLEAN_OPTIONS
-
name
-
index
private int index -
value
-
values
-
valueStringifier
-
narrationProvider
-
onValueChange
-
displayOnlyValue
private final boolean displayOnlyValue -
tooltipSupplier
-
-
构造器详细资料
-
CycleButton
CycleButton(int pX, int pY, int pWidth, int pHeight, Component pMessage, Component pName, int pIndex, T pValue, CycleButton.ValueListSupplier<T> pValues, Function<T, Component> pValueStringifier, Function<CycleButton<T>, MutableComponent> pNarrationProvider, CycleButton.OnValueChange<T> pOnValueChange, OptionInstance.TooltipSupplier<T> pTooltipSupplier, boolean pDisplayOnlyValue)
-
-
方法详细资料
-
updateTooltip
private void updateTooltip() -
onPress
public void onPress()- 指定者:
onPress
在类中AbstractButton
-
cycleValue
private void cycleValue(int pDelta) -
getCycledValue
-
mouseScrolled
public boolean mouseScrolled(double pMouseX, double pMouseY, double pDelta) -
setValue
-
updateValue
-
createLabelForValue
-
createFullName
-
getValue
-
createNarrationMessage
- 覆盖:
createNarrationMessage
在类中AbstractWidget
-
updateWidgetNarration
- 指定者:
updateWidgetNarration
在类中AbstractWidget
-
createDefaultNarrationMessage
-
builder
-
booleanBuilder
public static CycleButton.Builder<Boolean> booleanBuilder(Component pComponentOn, Component pComponentOff) -
onOffBuilder
-
onOffBuilder
-