类 SliderWidget
- java.lang.Object
-
- net.minecraft.client.gui.DrawableHelper
-
- net.minecraft.client.gui.widget.AbstractButtonWidget
-
- net.minecraft.client.gui.widget.SliderWidget
-
@Environment(CLIENT) public abstract class SliderWidget extends AbstractButtonWidget
- Mappings:
Namespace Name official dvtintermediary net/minecraft/class_357named net/minecraft/client/gui/widget/SliderWidget
-
-
字段概要
字段 修饰符和类型 字段 说明 protected doublevalue-
从类继承的字段 net.minecraft.client.gui.widget.AbstractButtonWidget
active, alpha, height, hovered, nextNarration, visible, WIDGETS_LOCATION, width, x, y
-
从类继承的字段 net.minecraft.client.gui.DrawableHelper
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE
-
-
构造器概要
构造器 构造器 说明 SliderWidget(int x, int y, int width, int height, Text text, double value)
-
方法概要
所有方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 protected abstract voidapplyValue()protected MutableTextgetNarrationMessage()protected intgetYImage(boolean hovered)booleankeyPressed(int keyCode, int scanCode, int modifiers)Callback for when a key down event has been captured.voidonClick(double mouseX, double mouseY)protected voidonDrag(double mouseX, double mouseY, double deltaX, double deltaY)voidonRelease(double mouseX, double mouseY)voidplayDownSound(SoundManager soundManager)protected voidrenderBg(MatrixStack matrices, MinecraftClient client, int mouseX, int mouseY)private voidsetValue(double mouseX)private voidsetValueFromMouse(double mouseX)protected abstract voidupdateMessage()-
从类继承的方法 net.minecraft.client.gui.widget.AbstractButtonWidget
changeFocus, clicked, getHeight, getMessage, getNarrationMessage, getWidth, isFocused, isHovered, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrate, onFocusedChanged, queueNarration, render, renderButton, renderToolTip, setAlpha, setFocused, setMessage, setWidth
-
从类继承的方法 net.minecraft.client.gui.DrawableHelper
drawCenteredString, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, method_33284, method_35719, method_35720, setZOffset
-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 net.minecraft.client.gui.Element
charTyped, keyReleased, mouseMoved, mouseScrolled
-
-
-
-
构造器详细资料
-
SliderWidget
public SliderWidget(int x, int y, int width, int height, Text text, double value)- Mappings:
Namespace Name Mixin selector official <init>Ldvt;<init>(IIIILon;D)Vintermediary <init>Lnet/minecraft/class_357;<init>(IIIILnet/minecraft/class_2561;D)Vnamed <init>Lnet/minecraft/client/gui/widget/SliderWidget;<init>(IIIILnet/minecraft/text/Text;D)V
-
-
方法详细资料
-
getYImage
protected int getYImage(boolean hovered)
- 覆盖:
getYImage在类中AbstractButtonWidget- Mappings:
Namespace Name Mixin selector official aLdvu;a(Z)Iintermediary method_25356Lnet/minecraft/class_339;method_25356(Z)Inamed getYImageLnet/minecraft/client/gui/widget/AbstractButtonWidget;getYImage(Z)I
-
getNarrationMessage
protected MutableText getNarrationMessage()
- 覆盖:
getNarrationMessage在类中AbstractButtonWidget- Mappings:
Namespace Name Mixin selector official cLdvu;c()Lot;intermediary method_25360Lnet/minecraft/class_339;method_25360()Lnet/minecraft/class_5250;named getNarrationMessageLnet/minecraft/client/gui/widget/AbstractButtonWidget;getNarrationMessage()Lnet/minecraft/text/MutableText;
-
renderBg
protected void renderBg(MatrixStack matrices, MinecraftClient client, int mouseX, int mouseY)
- 覆盖:
renderBg在类中AbstractButtonWidget- Mappings:
Namespace Name Mixin selector official aLdvu;a(Ldpi;Ldum;II)Vintermediary method_25353Lnet/minecraft/class_339;method_25353(Lnet/minecraft/class_4587;Lnet/minecraft/class_310;II)Vnamed renderBgLnet/minecraft/client/gui/widget/AbstractButtonWidget;renderBg(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/MinecraftClient;II)V
-
onClick
public void onClick(double mouseX, double mouseY)- 覆盖:
onClick在类中AbstractButtonWidget- Mappings:
Namespace Name Mixin selector official aLdvu;a(DD)Vintermediary method_25348Lnet/minecraft/class_339;method_25348(DD)Vnamed onClickLnet/minecraft/client/gui/widget/AbstractButtonWidget;onClick(DD)V
-
keyPressed
public boolean keyPressed(int keyCode, int scanCode, int modifiers)Callback for when a key down event has been captured. The key code is identified by the constants inGLFWclass.- 参数:
keyCode- the named key code of the event as described in theGLFWclassscanCode- the unique/platform-specific scan code of the keyboard inputmodifiers- a GLFW bitfield describing the modifier keys that are held down (see GLFW Modifier key flags)- 返回:
trueto indicate that the event handling is successful/valid- 另请参阅:
Keyboard.onKey(long, int, int, int, int),GLFW.GLFW_KEY_Q,GLFWKeyCallbackI.invoke(long, int, int, int, int)- Mappings:
Namespace Name Mixin selector official aLdwv;a(III)Zintermediary method_25404Lnet/minecraft/class_364;method_25404(III)Znamed keyPressedLnet/minecraft/client/gui/Element;keyPressed(III)Z
-
setValueFromMouse
private void setValueFromMouse(double mouseX)
- Mappings:
Namespace Name Mixin selector official aLdvt;a(D)Vintermediary method_25345Lnet/minecraft/class_357;method_25345(D)Vnamed setValueFromMouseLnet/minecraft/client/gui/widget/SliderWidget;setValueFromMouse(D)V
-
setValue
private void setValue(double mouseX)
- Mappings:
Namespace Name Mixin selector official bLdvt;b(D)Vintermediary method_25347Lnet/minecraft/class_357;method_25347(D)Vnamed setValueLnet/minecraft/client/gui/widget/SliderWidget;setValue(D)V
-
onDrag
protected void onDrag(double mouseX, double mouseY, double deltaX, double deltaY)- 覆盖:
onDrag在类中AbstractButtonWidget- Mappings:
Namespace Name Mixin selector official aLdvu;a(DDDD)Vintermediary method_25349Lnet/minecraft/class_339;method_25349(DDDD)Vnamed onDragLnet/minecraft/client/gui/widget/AbstractButtonWidget;onDrag(DDDD)V
-
playDownSound
public void playDownSound(SoundManager soundManager)
- 覆盖:
playDownSound在类中AbstractButtonWidget- Mappings:
Namespace Name Mixin selector official aLdvu;a(Lezu;)Vintermediary method_25354Lnet/minecraft/class_339;method_25354(Lnet/minecraft/class_1144;)Vnamed playDownSoundLnet/minecraft/client/gui/widget/AbstractButtonWidget;playDownSound(Lnet/minecraft/client/sound/SoundManager;)V
-
onRelease
public void onRelease(double mouseX, double mouseY)- 覆盖:
onRelease在类中AbstractButtonWidget- Mappings:
Namespace Name Mixin selector official a_Ldvu;a_(DD)Vintermediary method_25357Lnet/minecraft/class_339;method_25357(DD)Vnamed onReleaseLnet/minecraft/client/gui/widget/AbstractButtonWidget;onRelease(DD)V
-
updateMessage
protected abstract void updateMessage()
- Mappings:
Namespace Name Mixin selector official bLdvt;b()Vintermediary method_25346Lnet/minecraft/class_357;method_25346()Vnamed updateMessageLnet/minecraft/client/gui/widget/SliderWidget;updateMessage()V
-
applyValue
protected abstract void applyValue()
- Mappings:
Namespace Name Mixin selector official aLdvt;a()Vintermediary method_25344Lnet/minecraft/class_357;method_25344()Vnamed applyValueLnet/minecraft/client/gui/widget/SliderWidget;applyValue()V
-
-