Class TCGScreenChattableBase

java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
com.pixelmonmod.tcg.client.gui.base.TCGScreenBase
com.pixelmonmod.tcg.client.gui.base.TCGScreenChattableBase
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
Direct Known Subclasses:
TCGScreen

public class TCGScreenChattableBase extends TCGScreenBase
Created by Hy on 6/27/2016.
  • 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
    Chat entry field

    Fields inherited from class com.pixelmonmod.tcg.client.gui.base.TCGScreenBase

    textFieldList, visible

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

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

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

    DOUBLE_CLICK_THRESHOLD_MS
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    calculateChatboxHeight(double p_146243_0_)
    Calculates the height of the chatbox..
    static int
    calculateChatboxWidth(double p_146233_0_)
    Calculates the width of the chatbox.
    boolean
    charTyped(char key, int keyCode)
     
    void
    Closes the chatbox.
    void
    Opens the chatbox.
    void
    Auto-completes player name.
    int
    Calculates the height of the chatbox.
    double
    Returns the chatscale from mc.gameSettings.chatScale.
    int
    Calculates the width of the chatbox.
    int
    Calculates the number of lines in the chatbox.
    void
    getSentHistory(int par1)
    Input is relative and is applied directly to the sentHistoryCursor so -1 is the previous message and 1 is the next message from the current cursor position.
    void
     
    boolean
    mouseClicked(double mouseX, double mouseY, int mouseButton)
     
    void
     
    void
     

    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, renderBackground, renderDirtBackground, renderTransparentBackground, renderWithTooltip, repositionElements, resize, runNarration, scheduleNarration, setInitialFocus, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, shouldNarrateNavigation, shouldRunNarration, suppressNarration, 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, 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.
    • inputField

      protected net.minecraft.client.gui.components.EditBox inputField
      Chat entry field
  • Constructor Details

    • TCGScreenChattableBase

      public TCGScreenChattableBase()
  • Method Details

    • init

      public void init()
      Overrides:
      init in class net.minecraft.client.gui.screens.Screen
    • tick

      public void tick()
      Overrides:
      tick in class TCGScreenBase
    • onClose

      public void onClose()
      Overrides:
      onClose in class net.minecraft.client.gui.screens.Screen
    • chatOpened

      public void chatOpened(String start)
      Opens the chatbox.
      Parameters:
      start - The initial text in the chatbox.
    • chatClosed

      public void chatClosed()
      Closes the chatbox.
    • charTyped

      public boolean charTyped(char key, int keyCode)
      Specified by:
      charTyped in interface net.minecraft.client.gui.components.events.ContainerEventHandler
      Specified by:
      charTyped in interface net.minecraft.client.gui.components.events.GuiEventListener
      Overrides:
      charTyped in class TCGScreenBase
    • completePlayerName

      public void completePlayerName()
      Auto-completes player name.
    • getSentHistory

      public void getSentHistory(int par1)
      Input is relative and is applied directly to the sentHistoryCursor so -1 is the previous message and 1 is the next message from the current cursor position.
      Parameters:
      par1 - The location of the text history to get.
    • mouseClicked

      public boolean mouseClicked(double mouseX, double mouseY, int mouseButton)
      Specified by:
      mouseClicked in interface net.minecraft.client.gui.components.events.ContainerEventHandler
      Specified by:
      mouseClicked in interface net.minecraft.client.gui.components.events.GuiEventListener
      Overrides:
      mouseClicked in class TCGScreenBase
    • getChatWidth

      public int getChatWidth()
      Calculates the width of the chatbox.
      Returns:
      The width of the chatbox.
    • getChatHeight

      public int getChatHeight()
      Calculates the height of the chatbox.
      Returns:
      The height of the chatbox.
    • getChatScale

      public double getChatScale()
      Returns the chatscale from mc.gameSettings.chatScale.
      Returns:
      The chatscale from mc.gameSettings.chatScale.
    • calculateChatboxWidth

      public static int calculateChatboxWidth(double p_146233_0_)
      Calculates the width of the chatbox.
      Parameters:
      p_146233_0_ - The current settings for chatbox width.
      Returns:
      The width of the chatbox.
    • calculateChatboxHeight

      public static int calculateChatboxHeight(double p_146243_0_)
      Calculates the height of the chatbox..
      Parameters:
      p_146243_0_ - The current settings for chatbox height.
      Returns:
      The height of the chatbox.
    • getLineCount

      public int getLineCount()
      Calculates the number of lines in the chatbox.
      Returns:
      The number of lines in the chatbox.