public class GuiScreenBook extends GuiScreen
Modifier and Type | Class and Description |
---|---|
(package private) static class |
GuiScreenBook.NextPageButton |
Modifier and Type | Field and Description |
---|---|
private ItemStack |
book |
private static ResourceLocation |
BOOK_GUI_TEXTURES |
private boolean |
bookGettingSigned |
private int |
bookImageHeight |
private int |
bookImageWidth |
private boolean |
bookIsModified |
private boolean |
bookIsUnsigned |
private NBTTagList |
bookPages |
private java.lang.String |
bookTitle |
private int |
bookTotalPages |
private GuiButton |
buttonCancel |
private GuiButton |
buttonDone |
private GuiButton |
buttonFinalize |
private GuiScreenBook.NextPageButton |
buttonNextPage |
private GuiScreenBook.NextPageButton |
buttonPreviousPage |
private GuiButton |
buttonSign |
private java.util.List<ITextComponent> |
cachedComponents |
private int |
cachedPage |
private int |
currPage |
private EntityPlayer |
editingPlayer |
private static org.apache.logging.log4j.Logger |
LOGGER |
private int |
updateCount |
allowUserInput, buttonList, fontRenderer, height, itemRender, keyHandled, labelList, mc, mouseHandled, selectedButton, width
ICONS, OPTIONS_BACKGROUND, STAT_ICONS, zLevel
Constructor and Description |
---|
GuiScreenBook(EntityPlayer player,
ItemStack book,
boolean isUnsigned) |
Modifier and Type | Method and Description |
---|---|
protected void |
actionPerformed(GuiButton button) |
private void |
addNewPage() |
void |
drawScreen(int mouseX,
int mouseY,
float partialTicks) |
ITextComponent |
getClickedComponentAt(int p_175385_1_,
int p_175385_2_) |
boolean |
handleComponentClick(ITextComponent component) |
void |
initGui() |
protected void |
keyTyped(char typedChar,
int keyCode) |
private void |
keyTypedInBook(char typedChar,
int keyCode) |
private void |
keyTypedInTitle(char typedChar,
int keyCode) |
protected void |
mouseClicked(int mouseX,
int mouseY,
int mouseButton) |
void |
onGuiClosed() |
private java.lang.String |
pageGetCurrent() |
private void |
pageInsertIntoCurrent(java.lang.String p_146459_1_) |
private void |
pageSetCurrent(java.lang.String p_146457_1_) |
private void |
sendBookToServer(boolean publish) |
private void |
updateButtons() |
void |
updateScreen() |
addButton, confirmClicked, doesGuiPauseGame, drawBackground, drawDefaultBackground, drawHoveringText, drawHoveringText, drawHoveringText, drawWorldBackground, getClipboardString, getItemToolTip, handleComponentHover, handleInput, handleKeyboardInput, handleMouseInput, isAltKeyDown, isCtrlKeyDown, isFocused, isKeyComboCtrlA, isKeyComboCtrlC, isKeyComboCtrlV, isKeyComboCtrlX, isShiftKeyDown, mouseClickMove, mouseReleased, onResize, renderToolTip, sendChatMessage, sendChatMessage, setClipboardString, setFocused, setGuiSize, setText, setWorldAndResolution
drawCenteredString, drawGradientRect, drawHorizontalLine, drawModalRectWithCustomSizedTexture, drawRect, drawScaledCustomSizeModalRect, drawString, drawTexturedModalRect, drawTexturedModalRect, drawTexturedModalRect, drawVerticalLine
private static final org.apache.logging.log4j.Logger LOGGER
private static final ResourceLocation BOOK_GUI_TEXTURES
private final EntityPlayer editingPlayer
private final ItemStack book
private final boolean bookIsUnsigned
private boolean bookIsModified
private boolean bookGettingSigned
private int updateCount
private final int bookImageWidth
private final int bookImageHeight
private int bookTotalPages
private int currPage
private NBTTagList bookPages
private java.lang.String bookTitle
private java.util.List<ITextComponent> cachedComponents
private int cachedPage
private GuiScreenBook.NextPageButton buttonNextPage
private GuiScreenBook.NextPageButton buttonPreviousPage
private GuiButton buttonDone
private GuiButton buttonSign
private GuiButton buttonFinalize
private GuiButton buttonCancel
public GuiScreenBook(EntityPlayer player, ItemStack book, boolean isUnsigned)
public void updateScreen()
updateScreen
in class GuiScreen
public void onGuiClosed()
onGuiClosed
in class GuiScreen
private void updateButtons()
private void sendBookToServer(boolean publish) throws java.io.IOException
java.io.IOException
protected void actionPerformed(GuiButton button) throws java.io.IOException
actionPerformed
in class GuiScreen
java.io.IOException
private void addNewPage()
protected void keyTyped(char typedChar, int keyCode) throws java.io.IOException
private void keyTypedInBook(char typedChar, int keyCode)
private void keyTypedInTitle(char typedChar, int keyCode) throws java.io.IOException
java.io.IOException
private java.lang.String pageGetCurrent()
private void pageSetCurrent(java.lang.String p_146457_1_)
private void pageInsertIntoCurrent(java.lang.String p_146459_1_)
public void drawScreen(int mouseX, int mouseY, float partialTicks)
drawScreen
in class GuiScreen
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws java.io.IOException
mouseClicked
in class GuiScreen
java.io.IOException
public boolean handleComponentClick(ITextComponent component)
handleComponentClick
in class GuiScreen
@Nullable public ITextComponent getClickedComponentAt(int p_175385_1_, int p_175385_2_)