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,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 List<FormattedCharSequence> private static final intprivate final Componentprivate final booleanprivate static final intprivate final List<FormattedCharSequence> private final GuiMessageTag.Iconprivate final FormattedTextFields inherited from class net.minecraft.client.gui.components.AbstractSelectionList.Entry
listFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
Constructor Summary
ConstructorsConstructorDescriptionMessageEntry(int pChatId, Component pText, Component pNarration, GuiMessageTag pTagIcon, boolean pCanReport, boolean pPlayerMessage) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanprivate intprivate intbooleanbooleankeyPressed(int p_239368_, int p_239369_, int p_239370_) Called when a keyboard key is pressed within the GUI element.booleanmouseClicked(double p_239729_, double p_239730_, int p_239731_) Called when a mouse button is clicked within the GUI element.voidrender(GuiGraphics p_281361_, int p_239596_, int p_239597_, int p_239598_, int p_239599_, int p_239600_, int p_239601_, int p_239602_, boolean p_239603_, float p_239604_) private voidrenderSelectedCheckmark(GuiGraphics pGuiGraphics, int pTop, int pLeft, int pHeight) private voidrenderTag(GuiGraphics pGuiGraphics, int pX, int pY, int pHeight, int pMouseX, int pMouseY) private booleanMethods inherited from class net.minecraft.client.gui.components.ObjectSelectionList.Entry
updateNarrationMethods inherited from class net.minecraft.client.gui.components.AbstractSelectionList.Entry
isFocused, isMouseOver, renderBack, setFocusedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
charTyped, getBorderForArrowNavigation, getCurrentFocusPath, getRectangle, keyReleased, mouseDragged, mouseMoved, mouseReleased, mouseScrolled, nextFocusPathMethods inherited from interface net.minecraft.client.gui.components.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 pChatId, Component pText, Component pNarration, @Nullable GuiMessageTag pTagIcon, boolean pCanReport, boolean pPlayerMessage)
-
-
Method Details
-
render
public void render(GuiGraphics p_281361_, int p_239596_, int p_239597_, int p_239598_, int p_239599_, int p_239600_, int p_239601_, int p_239602_, boolean p_239603_, float p_239604_) - Specified by:
renderin classAbstractSelectionList.Entry<ChatSelectionScreen.ChatSelectionList.Entry>
-
renderTag
private void renderTag(GuiGraphics pGuiGraphics, int pX, int pY, int pHeight, int pMouseX, int pMouseY) -
renderSelectedCheckmark
-
getMaximumTextWidth
private int getMaximumTextWidth() -
getTextIndent
private int getTextIndent() -
getNarration
- Overrides:
getNarrationin classChatSelectionScreen.ChatSelectionList.Entry
-
mouseClicked
public boolean mouseClicked(double p_239729_, double p_239730_, int p_239731_) Description copied from interface:GuiEventListenerCalled when a mouse button is clicked within the GUI element.- Specified by:
mouseClickedin interfaceGuiEventListener- Overrides:
mouseClickedin classChatSelectionScreen.ChatSelectionList.Entry- Parameters:
p_239729_- the X coordinate of the mouse.p_239730_- the Y coordinate of the mouse.p_239731_- the button that was clicked.- Returns:
trueif the event is consumed,falseotherwise.
-
keyPressed
public boolean keyPressed(int p_239368_, int p_239369_, int p_239370_) Description copied from interface:GuiEventListenerCalled when a keyboard key is pressed within the GUI element.- Parameters:
p_239368_- the key code of the pressed key.p_239369_- the scan code of the pressed key.p_239370_- the keyboard modifiers.- Returns:
trueif the event is consumed,falseotherwise.
-
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()
-