类 ExtendedButton
java.lang.Object
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.AbstractButton
net.minecraft.client.gui.components.Button
net.minecraftforge.client.gui.widget.ExtendedButton
- 所有已实现的接口:
GuiEventListener
,Renderable
,TabOrderedElement
,LayoutElement
,NarratableEntry
,NarrationSupplier
This class provides a button that fixes several bugs present in the vanilla GuiButton drawing code.
The gist of it is that it allows buttons of any size without gaps in the graphics and with the
borders drawn properly. It also prevents button text from extending out of the sides of the button by
trimming the end of the string and adding an ellipsis.
The code that handles drawing the button is in GuiUtils.
The code that handles drawing the button is in GuiUtils.
-
嵌套类概要
从类继承的嵌套类/接口 net.minecraft.client.gui.components.Button
Button.Builder, Button.CreateNarration, Button.OnPress
从接口继承的嵌套类/接口 net.minecraft.client.gui.narration.NarratableEntry
NarratableEntry.NarrationPriority
-
字段概要
从类继承的字段 net.minecraft.client.gui.components.Button
BIG_WIDTH, createNarration, DEFAULT_HEIGHT, DEFAULT_NARRATION, DEFAULT_SPACING, DEFAULT_WIDTH, onPress, SMALL_WIDTH
从类继承的字段 net.minecraft.client.gui.components.AbstractButton
SPRITES, TEXT_MARGIN
从类继承的字段 net.minecraft.client.gui.components.AbstractWidget
active, alpha, height, isHovered, packedFGColor, UNSET_FG_COLOR, visible, width
从接口继承的字段 net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
构造器概要
构造器构造器说明ExtendedButton
(int xPos, int yPos, int width, int height, Component displayString, Button.OnPress handler) ExtendedButton
(int xPos, int yPos, int width, int height, Component displayString, Button.OnPress handler, Button.CreateNarration createNarration) ExtendedButton
(Button.Builder builder) -
方法概要
修饰符和类型方法说明void
renderWidget
(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) Draws this button to the screen.从类继承的方法 net.minecraft.client.gui.components.Button
builder, createNarrationMessage, onPress, updateWidgetNarration
从类继承的方法 net.minecraft.client.gui.components.AbstractButton
keyPressed, onClick, renderString
从类继承的方法 net.minecraft.client.gui.components.AbstractWidget
clearFGColor, defaultButtonNarrationText, getBottom, getFGColor, getHeight, getMessage, getRectangle, getRight, getTabOrderGroup, getTooltip, getWidth, getX, getY, isActive, isFocused, isHovered, isHoveredOrFocused, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrationPriority, nextFocusPath, onDrag, onRelease, playButtonClickSound, playDownSound, render, renderScrollingString, renderScrollingString, renderScrollingString, setAlpha, setFGColor, setFocused, setHeight, setMessage, setRectangle, setSize, 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, getBorderForArrowNavigation, getCurrentFocusPath, keyReleased, mouseMoved, mouseScrolled
从接口继承的方法 net.minecraft.client.gui.layouts.LayoutElement
setPosition
从接口继承的方法 net.minecraft.client.gui.narration.NarratableEntry
getNarratables
-
构造器详细资料
-
ExtendedButton
public ExtendedButton(int xPos, int yPos, int width, int height, Component displayString, Button.OnPress handler) -
ExtendedButton
public ExtendedButton(int xPos, int yPos, int width, int height, Component displayString, Button.OnPress handler, Button.CreateNarration createNarration) -
ExtendedButton
-
-
方法详细资料
-
renderWidget
Draws this button to the screen.- 覆盖:
renderWidget
在类中AbstractButton
-