Class ChatScreen
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.ChatScreen
- All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Renderable, TabOrderedElement
- Direct Known Subclasses:
InBedChatScreen
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceChatScreen.ChatConstructor<T extends ChatScreen>protected static enumNested classes/interfaces inherited from class Screen
Screen.NarratableSearchResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanprivate CommandSuggestionsprivate ChatComponent.DisplayModeprotected ChatScreen.ExitReasonprivate Stringprivate intprotected Stringprotected EditBoxprotected booleanstatic final doubleprivate static final Componentstatic final intprivate static final ComponentFields inherited from class Screen
FADE_IN_TIME, font, FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, minecraft, narratorButton, renderables, screenExecutor, title, width -
Constructor Summary
ConstructorsConstructorDescriptionChatScreen(String initial, boolean isDraft) ChatScreen(String initial, boolean isDraft, boolean closeOnSubmit) -
Method Summary
Modifier and TypeMethodDescriptionvoidextractBackground(GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a) voidextractRenderState(GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a) private @Nullable FormattedCharSequenceformatChat(String text, int offset) voidhandleChatInput(String msg, boolean addToRecent) private booleanhandleComponentClicked(Style clicked, boolean allowInsertions) protected voidinit()private booleanvoidinsertText(String text, boolean replace) booleanbooleanbooleankeyPressed(KeyEvent event) booleanmouseClicked(MouseButtonEvent event, boolean doubleClick) booleanmouseScrolled(double x, double y, double scrollX, double scrollY) voidmoveInHistory(int dir) normalizeChatMessage(String message) voidonClose()private voidvoidremoved()voidresize(int width, int height) protected voidprotected booleanprotected voidMethods inherited from class Screen
added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, canInterruptWithAnotherScreen, changeFocus, children, clearFocus, clearWidgets, clickCommandAction, clickUrlAction, defaultHandleClickEvent, defaultHandleGameClickEvent, extractBlurredBackground, extractMenuBackground, extractMenuBackground, extractMenuBackgroundTexture, extractPanorama, extractRenderStateWithTooltipAndSubtitles, extractTransparentBackground, fadeWidgets, fillCrashDetails, findNarratableWidget, getBackgroundMusic, getFont, getMinecraft, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleDelayedNarration, init, isInGameUi, isMouseOver, isValidCharacterForName, onFilesDrop, panoramaShouldSpin, rebuildWidgets, removeWidget, repositionElements, setInitialFocus, shouldCloseOnEsc, shouldNarrateNavigation, showsActiveEffects, tick, triggerImmediateNarration, updateNarratedWidget, updateNarratorStatusMethods inherited from class AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocusedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ContainerEventHandler
charTyped, getBorderForArrowNavigation, getChildAt, getCurrentFocusPath, isFocused, keyReleased, mouseDragged, mouseReleased, nextFocusPath, preeditUpdated, setFocusedMethods inherited from interface GuiEventListener
mouseMoved, shouldTakeFocusAfterInteractionMethods inherited from interface TabOrderedElement
getTabOrderGroup
-
Field Details
-
MOUSE_SCROLL_SPEED
public static final double MOUSE_SCROLL_SPEED- See Also:
-
USAGE_TEXT
-
RESTRICTED_NARRATION_TEXT
-
USAGE_BACKGROUND_COLOR
public static final int USAGE_BACKGROUND_COLOR- See Also:
-
closeOnSubmit
private final boolean closeOnSubmit -
historyBuffer
-
historyPos
private int historyPos -
input
-
initial
-
isDraft
protected boolean isDraft -
displayMode
-
exitReason
-
commandSuggestions
-
-
Constructor Details
-
ChatScreen
-
ChatScreen
-
-
Method Details
-
init
-
setInitialFocus
protected void setInitialFocus()- Overrides:
setInitialFocusin classScreen
-
resize
-
onClose
-
removed
-
shouldDiscardDraft
protected boolean shouldDiscardDraft() -
onEdited
-
keyPressed
- Specified by:
keyPressedin interfaceContainerEventHandler- Specified by:
keyPressedin interfaceGuiEventListener- Overrides:
keyPressedin classScreen
-
mouseScrolled
public boolean mouseScrolled(double x, double y, double scrollX, double scrollY) -
mouseClicked
-
insertionClickMode
private boolean insertionClickMode() -
handleComponentClicked
-
insertText
- Overrides:
insertTextin classScreen
-
moveInHistory
public void moveInHistory(int dir) -
formatChat
-
extractRenderState
- Specified by:
extractRenderStatein interfaceRenderable- Overrides:
extractRenderStatein classScreen
-
extractBackground
- Overrides:
extractBackgroundin classScreen
-
isPauseScreen
public boolean isPauseScreen()- Overrides:
isPauseScreenin classScreen
-
isAllowedInPortal
public boolean isAllowedInPortal()- Overrides:
isAllowedInPortalin classScreen
-
updateNarrationState
- Overrides:
updateNarrationStatein classScreen
-
handleChatInput
-
normalizeChatMessage
-