public class GuiChat extends GuiScreen
| Modifier and Type | Field and Description |
|---|---|
private int |
autocompleteIndex |
private java.lang.String |
defaultInputFieldText
is the text that appears when you press the chat key and the input box appears pre-filled
|
private java.util.List<java.lang.String> |
foundPlayerNames |
private java.lang.String |
historyBuffer |
protected GuiTextField |
inputField
Chat entry field
|
private static org.apache.logging.log4j.Logger |
logger |
private boolean |
playerNamesFound |
private int |
sentHistoryCursor
keeps position of which chat message you will select when you press up, (does not increase for duplicated
messages sent immediately after each other)
|
private boolean |
waitingOnAutocomplete |
allowUserInput, buttonList, fontRendererObj, height, itemRender, labelList, mc, widthicons, optionsBackground, statIcons, zLevel| Constructor and Description |
|---|
GuiChat() |
GuiChat(java.lang.String defaultText) |
| Modifier and Type | Method and Description |
|---|---|
void |
autocompletePlayerNames() |
boolean |
doesGuiPauseGame()
Returns true if this GUI should pause the game when it is displayed in single-player
|
void |
drawScreen(int mouseX,
int mouseY,
float partialTicks)
Draws the screen and all the components in it.
|
void |
getSentHistory(int msgPos)
input is relative and is applied directly to the sentHistoryCursor so -1 is the previous message, 1 is the next
message from the current cursor position
|
void |
handleMouseInput()
Handles mouse input.
|
void |
initGui()
Adds the buttons (and other controls) to the screen in question.
|
protected void |
keyTyped(char typedChar,
int keyCode)
Fired when a key is typed (except F11 which toggles full screen).
|
protected void |
mouseClicked(int mouseX,
int mouseY,
int mouseButton)
Called when the mouse is clicked.
|
void |
onAutocompleteResponse(java.lang.String[] p_146406_1_) |
void |
onGuiClosed()
Called when the screen is unloaded.
|
private void |
sendAutocompleteRequest(java.lang.String p_146405_1_,
java.lang.String p_146405_2_) |
protected void |
setText(java.lang.String newChatText,
boolean shouldOverwrite)
Sets the text of the chat
|
void |
updateScreen()
Called from the main game loop to update the screen.
|
actionPerformed, confirmClicked, drawBackground, drawCreativeTabHoveringText, drawDefaultBackground, drawHoveringText, drawWorldBackground, getClipboardString, handleComponentClick, handleComponentHover, handleInput, handleKeyboardInput, isAltKeyDown, isCtrlKeyDown, isKeyComboCtrlA, isKeyComboCtrlC, isKeyComboCtrlV, isKeyComboCtrlX, isShiftKeyDown, mouseClickMove, mouseReleased, onResize, renderToolTip, sendChatMessage, sendChatMessage, setClipboardString, setWorldAndResolutiondrawCenteredString, drawGradientRect, drawHorizontalLine, drawModalRectWithCustomSizedTexture, drawRect, drawScaledCustomSizeModalRect, drawString, drawTexturedModalRect, drawTexturedModalRect, drawTexturedModalRect, drawVerticalLineprivate static final org.apache.logging.log4j.Logger logger
private java.lang.String historyBuffer
private int sentHistoryCursor
private boolean playerNamesFound
private boolean waitingOnAutocomplete
private int autocompleteIndex
private java.util.List<java.lang.String> foundPlayerNames
protected GuiTextField inputField
private java.lang.String defaultInputFieldText
public void initGui()
public void onGuiClosed()
onGuiClosed in class GuiScreenpublic void updateScreen()
updateScreen in class GuiScreenprotected void keyTyped(char typedChar,
int keyCode)
throws java.io.IOException
public void handleMouseInput()
throws java.io.IOException
handleMouseInput in class GuiScreenjava.io.IOExceptionprotected void mouseClicked(int mouseX,
int mouseY,
int mouseButton)
throws java.io.IOException
mouseClicked in class GuiScreenjava.io.IOExceptionprotected void setText(java.lang.String newChatText,
boolean shouldOverwrite)
public void autocompletePlayerNames()
private void sendAutocompleteRequest(java.lang.String p_146405_1_,
java.lang.String p_146405_2_)
public void getSentHistory(int msgPos)
public void drawScreen(int mouseX,
int mouseY,
float partialTicks)
drawScreen in class GuiScreenpublic void onAutocompleteResponse(java.lang.String[] p_146406_1_)
public boolean doesGuiPauseGame()
doesGuiPauseGame in class GuiScreen