Class ChatExtensionScreen
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
com.pixelmonmod.pixelmon.client.gui.widgets.ChatExtensionScreen
- All Implemented Interfaces:
net.minecraft.client.gui.components.events.ContainerEventHandler,net.minecraft.client.gui.components.events.GuiEventListener,net.minecraft.client.gui.components.Renderable,net.minecraft.client.gui.components.TabOrderedElement
public class ChatExtensionScreen
extends net.minecraft.client.gui.screens.Screen
Handles chat during battle.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.Screen.NarratableSearchResult -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic booleanWhether the chatbox is open.protected net.minecraft.client.gui.components.EditBoxbooleanFields inherited from class net.minecraft.client.gui.screens.Screen
children, CUBE_MAP, font, FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, narratorButton, PANORAMA, renderables, screenExecutor, title, widthFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
Constructor Summary
ConstructorsConstructorDescriptionChatExtensionScreen(net.minecraft.client.gui.screens.Screen screen, int yOffset) Initializes the chat. -
Method Summary
Modifier and TypeMethodDescriptionbooleancharTyped(char typedChar, int keyCode) voiddrawScreen(net.minecraft.client.gui.GuiGraphics graphics, int par1, int par2, float par3) Draws the chatbox.voidinit()Sets up the chat.booleanGets whether chat is currently open or not.booleankeyPressed(int keyCode, int scanCode, int modifiers) Puts keyboard input into the chatbox.booleanmouseClicked(double mouseX, double mouseY, int button) voidmouseClickedUnderMenus(int par1, int par2, int par3) Handles mouse input.booleanmouseScrolled(double mouseX, double mouseY, double delta) Scrolls through the chat when the scroll wheel is inputted.voidonClose()Resets the chat.voidsendMessage(String text) voidtick(int height) Updates the cursor flash animation.Methods inherited from class net.minecraft.client.gui.screens.Screen
added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, changeFocus, children, clearFocus, clearTooltipForNextRenderPass, clearWidgets, createArrowEvent, createTabEvent, findNarratableWidget, getBackgroundMusic, getMinecraft, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, onFilesDrop, rebuildWidgets, removed, removeWidget, render, renderBackground, renderBlurredBackground, renderMenuBackground, renderMenuBackground, renderMenuBackgroundTexture, renderPanorama, renderTransparentBackground, renderWithTooltip, repositionElements, resize, setInitialFocus, setInitialFocus, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, shouldNarrateNavigation, tick, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, updateNarratorStatus, wrapScreenErrorMethods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, 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.ContainerEventHandler
getChildAt, getCurrentFocusPath, isFocused, keyReleased, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMovedMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Field Details
-
chatOpen
public static boolean chatOpenWhether the chatbox is open. -
updateHeight
public boolean updateHeight -
inputField
protected net.minecraft.client.gui.components.EditBox inputField
-
-
Constructor Details
-
ChatExtensionScreen
public ChatExtensionScreen(net.minecraft.client.gui.screens.Screen screen, int yOffset) Initializes the chat.- Parameters:
screen- The screen that contains the chat.yOffset- The y offset of the chat from the bottom of the screen.
-
-
Method Details
-
charTyped
public boolean charTyped(char typedChar, int keyCode) -
mouseClicked
public boolean mouseClicked(double mouseX, double mouseY, int button) -
keyPressed
public boolean keyPressed(int keyCode, int scanCode, int modifiers) Puts keyboard input into the chatbox.- Specified by:
keyPressedin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Specified by:
keyPressedin interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
keyPressedin classnet.minecraft.client.gui.screens.Screen
-
init
public void init()Sets up the chat.- Overrides:
initin classnet.minecraft.client.gui.screens.Screen
-
onClose
public void onClose()Resets the chat.- Overrides:
onClosein classnet.minecraft.client.gui.screens.Screen
-
tick
public void tick(int height) Updates the cursor flash animation. -
isChatOpen
public boolean isChatOpen()Gets whether chat is currently open or not. -
drawScreen
public void drawScreen(net.minecraft.client.gui.GuiGraphics graphics, int par1, int par2, float par3) Draws the chatbox.- Parameters:
par1- The x coordinate of the mouse.par2- The y coordinate of the mouse.par3- The current amount of partial ticks.
-
sendMessage
-
mouseScrolled
public boolean mouseScrolled(double mouseX, double mouseY, double delta) Scrolls through the chat when the scroll wheel is inputted. -
mouseClickedUnderMenus
public void mouseClickedUnderMenus(int par1, int par2, int par3) Handles mouse input.- Parameters:
par1- The x coordinate of the mouse.par2- The y coordinate of the mouse.par3- The button that was clicked.
-