Class ConfigurationScreen.ConfigurationListScreen.ListLabelWidget
java.lang.Object
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.AbstractScrollArea
net.minecraft.client.gui.components.AbstractContainerWidget
net.neoforged.neoforge.client.gui.ConfigurationScreen.ConfigurationListScreen.ListLabelWidget
- All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Renderable, TabOrderedElement, LayoutElement, NarratableEntry, NarrationSupplier
- Enclosing class:
ConfigurationScreen.ConfigurationListScreen<T>
public class ConfigurationScreen.ConfigurationListScreen.ListLabelWidget
extends AbstractContainerWidget
A widget to be used as a label in a list of configuration values.
It includes buttons for "move element up", "move element down", and "delete element" as well as a label.
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractScrollArea
AbstractScrollArea.ScrollbarSettingsNested classes/interfaces inherited from class AbstractWidget
AbstractWidget.WithInactiveMessageNested classes/interfaces inherited from interface NarratableEntry
NarratableEntry.NarrationPriority -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Buttonprotected final Buttonprotected final intprotected final booleanprotected final booleanprotected final StringWidgetprotected final ButtonFields inherited from class AbstractScrollArea
SCROLLBAR_WIDTHFields inherited from class AbstractWidget
active, alpha, height, isHovered, message, packedFGColor, UNSET_FG_COLOR, visible, width -
Constructor Summary
ConstructorsConstructorDescriptionListLabelWidget(int x, int y, int width, int height, Component labelText, int idx) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidList<? extends GuiEventListener> children()protected int(package private) void(package private) voidprotected voidrenderWidget(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) protected doublevoidsetHeight(int pHeight) voidsetSize(int pWidth, int pHeight) voidsetWidth(int pWidth) voidsetX(int pX) voidsetY(int pY) (package private) voidprotected voidprotected voidupdateWidgetNarration(NarrationElementOutput pNarrationElementOutput) Methods inherited from class AbstractContainerWidget
getFocused, isDragging, isFocused, mouseClicked, mouseDragged, mouseReleased, nextFocusPath, setDragging, setFocused, setFocusedMethods inherited from class AbstractScrollArea
defaultSettings, isOverScrollbar, maxScrollAmount, mouseScrolled, onRelease, refreshScrollAmount, renderScrollbar, scrollable, scrollAmount, scrollbarWidth, scrollBarX, scrollBarY, scrollerHeight, setScrollAmount, updateScrollingMethods inherited from class AbstractWidget
clearFGColor, createNarrationMessage, defaultButtonNarrationText, getAlpha, getBottom, getFGColor, getHeight, getMessage, getRectangle, getRight, getTabOrderGroup, getWidth, getX, getY, handleCursor, isActive, isHovered, isHoveredOrFocused, isMouseOver, isValidClickButton, narrationPriority, onClick, onDrag, playButtonClickSound, playDownSound, render, renderScrollingStringOverContents, setAlpha, setFGColor, setMessage, setRectangle, setTabOrderGroup, setTooltip, setTooltipDelay, updateNarration, visitWidgets, wrapDefaultNarrationMessageMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ContainerEventHandler
charTyped, getBorderForArrowNavigation, getChildAt, getCurrentFocusPath, keyPressed, keyReleased, mouseScrolledMethods inherited from interface GuiEventListener
getRectangle, isMouseOver, mouseMoved, shouldTakeFocusAfterInteractionMethods inherited from interface LayoutElement
setPositionMethods inherited from interface NarratableEntry
getNarratablesMethods inherited from interface TabOrderedElement
getTabOrderGroup
-
Field Details
-
upButton
-
downButton
-
delButton
-
label
-
idx
protected final int idx -
isFirst
protected final boolean isFirst -
isLast
protected final boolean isLast
-
-
Constructor Details
-
ListLabelWidget
-
-
Method Details
-
setX
public void setX(int pX) - Specified by:
setXin interfaceLayoutElement- Overrides:
setXin classAbstractWidget
-
setY
public void setY(int pY) - Specified by:
setYin interfaceLayoutElement- Overrides:
setYin classAbstractWidget
-
setHeight
public void setHeight(int pHeight) - Overrides:
setHeightin classAbstractWidget
-
setWidth
public void setWidth(int pWidth) - Overrides:
setWidthin classAbstractWidget
-
setSize
public void setSize(int pWidth, int pHeight) - Overrides:
setSizein classAbstractWidget
-
updateLayout
protected void updateLayout() -
up
-
down
-
rem
-
children
-
renderWidget
- Specified by:
renderWidgetin classAbstractWidget
-
checkButtons
protected void checkButtons() -
updateWidgetNarration
- Specified by:
updateWidgetNarrationin classAbstractWidget
-
contentHeight
protected int contentHeight()- Specified by:
contentHeightin classAbstractScrollArea
-
scrollRate
protected double scrollRate()- Overrides:
scrollRatein classAbstractScrollArea
-