Class ChatSelectionScreen.ChatSelectionList.MessageEntry
java.lang.Object
net.minecraft.client.gui.components.AbstractSelectionList.Entry<ChatSelectionScreen.ChatSelectionList.Entry>
net.minecraft.client.gui.components.ObjectSelectionList.Entry<ChatSelectionScreen.ChatSelectionList.Entry>
net.minecraft.client.gui.screens.reporting.ChatSelectionScreen.ChatSelectionList.Entry
net.minecraft.client.gui.screens.reporting.ChatSelectionScreen.ChatSelectionList.MessageEntry
- All Implemented Interfaces:
GuiEventListener, TabOrderedElement, LayoutElement, NarrationSupplier
- Enclosing class:
ChatSelectionScreen.ChatSelectionList
public class ChatSelectionScreen.ChatSelectionList.MessageEntry
extends ChatSelectionScreen.ChatSelectionList.Entry
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanprivate final intprivate static final intprivate static final intprivate final @Nullable List<FormattedCharSequence> private static final intprivate final Componentprivate final booleanprivate static final intprivate final @Nullable List<FormattedCharSequence> private final @Nullable GuiMessageTag.Iconprivate final FormattedTextFields inherited from class AbstractSelectionList.Entry
CONTENT_PADDING, list -
Constructor Summary
ConstructorsConstructorDescriptionMessageEntry(int chatId, Component text, Component narration, @Nullable GuiMessageTag tag, boolean canReport, boolean playerMessage) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanprivate intprivate intbooleanbooleankeyPressed(KeyEvent event) booleanmouseClicked(MouseButtonEvent event, boolean doubleClick) voidrenderContent(GuiGraphics graphics, int mouseX, int mouseY, boolean hovered, float a) private voidrenderSelectedCheckmark(GuiGraphics graphics, int rowTop, int rowLeft, int rowHeight) private voidrenderTag(GuiGraphics graphics, int iconLeft, int rowTop, int rowHeight, int mouseX, int mouseY) private booleanMethods inherited from class ObjectSelectionList.Entry
updateNarrationMethods inherited from class AbstractSelectionList.Entry
getContentBottom, getContentHeight, getContentRight, getContentWidth, getContentX, getContentXMiddle, getContentY, getContentYMiddle, getHeight, getRectangle, getWidth, getX, getY, isFocused, isMouseOver, setFocused, setHeight, setWidth, setX, setY, visitWidgetsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface GuiEventListener
charTyped, getBorderForArrowNavigation, getCurrentFocusPath, keyReleased, mouseDragged, mouseMoved, mouseReleased, mouseScrolled, nextFocusPath, shouldTakeFocusAfterInteractionMethods inherited from interface LayoutElement
setPositionMethods inherited from interface TabOrderedElement
getTabOrderGroup
-
Field Details
-
CHECKMARK_WIDTH
private static final int CHECKMARK_WIDTH- See Also:
-
CHECKMARK_HEIGHT
private static final int CHECKMARK_HEIGHT- See Also:
-
INDENT_AMOUNT
private static final int INDENT_AMOUNT- See Also:
-
TAG_MARGIN_LEFT
private static final int TAG_MARGIN_LEFT- See Also:
-
chatId
private final int chatId -
text
-
narration
-
hoverText
-
tagIcon
-
tagHoverText
-
canReport
private final boolean canReport -
playerMessage
private final boolean playerMessage
-
-
Constructor Details
-
MessageEntry
public MessageEntry(int chatId, Component text, Component narration, @Nullable GuiMessageTag tag, boolean canReport, boolean playerMessage)
-
-
Method Details
-
renderContent
- Specified by:
renderContentin classAbstractSelectionList.Entry<ChatSelectionScreen.ChatSelectionList.Entry>
-
renderTag
private void renderTag(GuiGraphics graphics, int iconLeft, int rowTop, int rowHeight, int mouseX, int mouseY) -
renderSelectedCheckmark
-
getMaximumTextWidth
private int getMaximumTextWidth() -
getTextIndent
private int getTextIndent() -
getNarration
- Overrides:
getNarrationin classChatSelectionScreen.ChatSelectionList.Entry
-
mouseClicked
- Specified by:
mouseClickedin interfaceGuiEventListener- Overrides:
mouseClickedin classChatSelectionScreen.ChatSelectionList.Entry
-
keyPressed
-
isSelected
public boolean isSelected()- Overrides:
isSelectedin classChatSelectionScreen.ChatSelectionList.Entry
-
canSelect
public boolean canSelect()- Overrides:
canSelectin classChatSelectionScreen.ChatSelectionList.Entry
-
canReport
public boolean canReport()- Overrides:
canReportin classChatSelectionScreen.ChatSelectionList.Entry
-
toggleReport
private boolean toggleReport()
-