public class EditBookScreen extends Screen
Modifier and Type | Class and Description |
---|---|
(package private) class |
EditBookScreen.Point |
Modifier and Type | Field and Description |
---|---|
private ItemStack |
book |
private boolean |
bookGettingSigned |
private boolean |
bookIsModified |
private java.util.List<java.lang.String> |
bookPages |
private java.lang.String |
bookTitle |
private Button |
buttonCancel |
private Button |
buttonDone |
private Button |
buttonFinalize |
private ChangePageButton |
buttonNextPage |
private ChangePageButton |
buttonPreviousPage |
private Button |
buttonSign |
private int |
cachedPage |
private int |
currPage |
private PlayerEntity |
editingPlayer |
private Hand |
hand |
private long |
lastClickTime |
private int |
selectionEnd |
private int |
selectionStart |
private int |
updateCount |
buttons, children, font, height, itemRenderer, minecraft, passEvents, title, width
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION
Constructor and Description |
---|
EditBookScreen(PlayerEntity player,
ItemStack bookIn,
Hand handIn) |
Modifier and Type | Method and Description |
---|---|
private void |
addNewPage() |
private void |
backspacePressed(java.lang.String pageText) |
boolean |
charTyped(char p_charTyped_1_,
int p_charTyped_2_) |
private void |
deletePressed(java.lang.String pageText) |
private void |
downPressed(java.lang.String pageText) |
private void |
drawSelectionBox(EditBookScreen.Point topLeft,
EditBookScreen.Point bottomRight) |
private void |
endPressed(java.lang.String pageText) |
private EditBookScreen.Point |
func_214194_c(java.lang.String pageText,
int p_214194_2_) |
private int |
func_214203_a(java.lang.String p_214203_1_,
EditBookScreen.Point p_214203_2_) |
private int |
func_214206_a(java.lang.String p_214206_1_,
int p_214206_2_) |
private void |
func_214210_b(EditBookScreen.Point p_214210_1_) |
private int |
func_214216_b(java.lang.String p_214216_1_,
int p_214216_2_) |
private void |
func_214217_j(java.lang.String p_214217_1_) |
private void |
func_214224_c(EditBookScreen.Point p_214224_1_) |
private int |
func_214226_d(java.lang.String p_214226_1_,
int p_214226_2_) |
private void |
func_214227_a(EditBookScreen.Point p_214227_1_) |
private java.lang.String |
getCurrPageText() |
private int |
getPageCount() |
private java.lang.String |
getSelectedText() |
private int |
getTextWidth(java.lang.String text) |
private void |
highlightSelectedText(java.lang.String pageText) |
private void |
homePressed(java.lang.String pageText) |
protected void |
init() |
private void |
insertTextIntoPage(java.lang.String text) |
boolean |
keyPressed(int p_keyPressed_1_,
int p_keyPressed_2_,
int p_keyPressed_3_) |
private boolean |
keyPressedInBook(int keyCode,
int scanCode,
int modifiers) |
private boolean |
keyPressedInTitle(int keyCode,
int scanCode,
int modifiers) |
private void |
leftPressed(java.lang.String pageText) |
boolean |
mouseClicked(double p_mouseClicked_1_,
double p_mouseClicked_3_,
int p_mouseClicked_5_) |
boolean |
mouseDragged(double p_mouseDragged_1_,
double p_mouseDragged_3_,
int p_mouseDragged_5_,
double p_mouseDragged_6_,
double p_mouseDragged_8_) |
private void |
nextPage() |
private void |
previousPage() |
void |
removed() |
private void |
removeSelectedText() |
private java.lang.String |
removeUnprintableChars(java.lang.String text) |
void |
render(int p_render_1_,
int p_render_2_,
float p_render_3_) |
private void |
rightPressed(java.lang.String pageText) |
private void |
sendBookToServer(boolean publish) |
void |
tick() |
private void |
trimEmptyPages() |
private void |
updateButtons() |
private void |
upPressed(java.lang.String pageText) |
addButton, children, getMinecraft, getNarrationMessage, getTitle, getTooltipFromItem, handleComponentClicked, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, onClose, renderBackground, renderBackground, renderComponentHoverEffect, renderDirtBackground, renderTooltip, renderTooltip, renderTooltip, renderTooltip, resize, sendMessage, sendMessage, setSize, shouldCloseOnEsc, wrapScreenError
getFocused, isDragging, setDragging, setFocused
blit, blit, blit, blit, blit, drawCenteredString, drawRightAlignedString, drawString, fill, fill, fillGradient, getBlitOffset, hLine, innerBlit, setBlitOffset, vLine
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
changeFocus, func_212932_b, getEventListenerForPos, keyReleased, mouseReleased, mouseScrolled, setFocusedDefault
mouseMoved
private final PlayerEntity editingPlayer
private final ItemStack book
private boolean bookIsModified
private boolean bookGettingSigned
private int updateCount
private int currPage
private final java.util.List<java.lang.String> bookPages
private java.lang.String bookTitle
private int selectionEnd
private int selectionStart
private long lastClickTime
private int cachedPage
private ChangePageButton buttonNextPage
private ChangePageButton buttonPreviousPage
private Button buttonDone
private Button buttonSign
private Button buttonFinalize
private Button buttonCancel
private final Hand hand
public EditBookScreen(PlayerEntity player, ItemStack bookIn, Hand handIn)
private int getPageCount()
private java.lang.String removeUnprintableChars(java.lang.String text)
private void previousPage()
private void nextPage()
private void updateButtons()
private void trimEmptyPages()
private void sendBookToServer(boolean publish)
private void addNewPage()
public boolean keyPressed(int p_keyPressed_1_, int p_keyPressed_2_, int p_keyPressed_3_)
keyPressed
in interface IGuiEventListener
keyPressed
in interface INestedGuiEventHandler
keyPressed
in class Screen
public boolean charTyped(char p_charTyped_1_, int p_charTyped_2_)
private boolean keyPressedInBook(int keyCode, int scanCode, int modifiers)
private void backspacePressed(java.lang.String pageText)
private void deletePressed(java.lang.String pageText)
private void leftPressed(java.lang.String pageText)
private void rightPressed(java.lang.String pageText)
private void upPressed(java.lang.String pageText)
private void downPressed(java.lang.String pageText)
private void homePressed(java.lang.String pageText)
private void endPressed(java.lang.String pageText)
private void removeSelectedText()
private int func_214206_a(java.lang.String p_214206_1_, int p_214206_2_)
private boolean keyPressedInTitle(int keyCode, int scanCode, int modifiers)
private java.lang.String getCurrPageText()
private void func_214217_j(java.lang.String p_214217_1_)
private void insertTextIntoPage(java.lang.String text)
public void render(int p_render_1_, int p_render_2_, float p_render_3_)
render
in interface IRenderable
render
in class Screen
private int getTextWidth(java.lang.String text)
private int func_214216_b(java.lang.String p_214216_1_, int p_214216_2_)
private java.lang.String getSelectedText()
private void highlightSelectedText(java.lang.String pageText)
private void drawSelectionBox(EditBookScreen.Point topLeft, EditBookScreen.Point bottomRight)
private EditBookScreen.Point func_214194_c(java.lang.String pageText, int p_214194_2_)
private void func_214227_a(EditBookScreen.Point p_214227_1_)
private void func_214210_b(EditBookScreen.Point p_214210_1_)
private void func_214224_c(EditBookScreen.Point p_214224_1_)
private int func_214226_d(java.lang.String p_214226_1_, int p_214226_2_)
private int func_214203_a(java.lang.String p_214203_1_, EditBookScreen.Point p_214203_2_)
public boolean mouseClicked(double p_mouseClicked_1_, double p_mouseClicked_3_, int p_mouseClicked_5_)
public boolean mouseDragged(double p_mouseDragged_1_, double p_mouseDragged_3_, int p_mouseDragged_5_, double p_mouseDragged_6_, double p_mouseDragged_8_)