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

    Fields
    Modifier and Type
    Field
    Description
    static boolean
    Whether the chatbox is open.
    protected net.minecraft.client.gui.components.EditBox
     
    boolean
     

    Fields inherited from class net.minecraft.client.gui.screens.Screen

    BACKGROUND_LOCATION, children, font, height, renderables, screenExecutor, title, width

    Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener

    DOUBLE_CLICK_THRESHOLD_MS
  • Constructor Summary

    Constructors
    Constructor
    Description
    ChatExtensionScreen(net.minecraft.client.gui.screens.Screen screen, int yOffset)
    Initializes the chat.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    charTyped(char typedChar, int keyCode)
     
    void
    drawScreen(net.minecraft.client.gui.GuiGraphics graphics, int par1, int par2, float par3)
    Draws the chatbox.
    void
    Sets up the chat.
    boolean
    Gets whether chat is currently open or not.
    boolean
    keyPressed(int keyCode, int scanCode, int modifiers)
    Puts keyboard input into the chatbox.
    boolean
    mouseClicked(double mouseX, double mouseY, int button)
     
    void
    mouseClickedUnderMenus(int par1, int par2, int par3)
    Handles mouse input.
    boolean
    mouseScrolled(double mouseX, double mouseY, double delta)
    Scrolls through the chat when the scroll wheel is inputted.
    void
    Resets the chat.
    void
     
    void
    tick(int height)
    Updates the cursor flash animation.

    Methods inherited from class net.minecraft.client.gui.screens.Screen

    added, addEventWidget, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, changeFocus, children, clearFocus, clearWidgets, confirmLink, createArrowEvent, createTabEvent, findNarratableWidget, getBackgroundMusic, getMinecraft, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, hideWidgets, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, narrationEnabled, onFilesDrop, openLink, rebuildWidgets, removed, removeWidget, render, renderBackground, renderDirtBackground, renderTransparentBackground, renderWithTooltip, repositionElements, resize, runNarration, scheduleNarration, setInitialFocus, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, shouldNarrateNavigation, shouldRunNarration, suppressNarration, tick, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, wrapScreenError

    Methods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler

    getFocused, isDragging, setDragging, setFocused

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler

    getChildAt, getCurrentFocusPath, isFocused, keyReleased, magicalSpecialHackyFocus, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, setFocused

    Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener

    mouseMoved

    Methods inherited from interface net.minecraft.client.gui.components.TabOrderedElement

    getTabOrderGroup
  • Field Details

    • chatOpen

      public static boolean chatOpen
      Whether 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:
      keyPressed in interface net.minecraft.client.gui.components.events.ContainerEventHandler
      Specified by:
      keyPressed in interface net.minecraft.client.gui.components.events.GuiEventListener
      Overrides:
      keyPressed in class net.minecraft.client.gui.screens.Screen
    • init

      public void init()
      Sets up the chat.
      Overrides:
      init in class net.minecraft.client.gui.screens.Screen
    • onClose

      public void onClose()
      Resets the chat.
      Overrides:
      onClose in class net.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

      public void sendMessage(String text)
    • 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.