@Environment(value=CLIENT) public class BookEditScreen extends Screen
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
BookEditScreen.Line |
(package private) static class |
BookEditScreen.PageContent |
(package private) static class |
BookEditScreen.Position |
| Modifier and Type | Field and Description |
|---|---|
private ButtonWidget |
cancelButton |
private int |
currentPage |
private boolean |
dirty |
private ButtonWidget |
doneButton |
private SelectionManager |
field_24269 |
private SelectionManager |
field_24270 |
private ButtonWidget |
finalizeButton |
private Hand |
hand |
private ItemStack |
itemStack |
private int |
lastClickIndex |
private long |
lastClickTime |
private PageTurnWidget |
nextPageButton |
private BookEditScreen.PageContent |
pageContent |
private List<String> |
pages |
private PlayerEntity |
player |
private PageTurnWidget |
previousPageButton |
private ButtonWidget |
signButton |
private boolean |
signing |
private int |
tickCounter |
private String |
title |
buttons, children, client, height, itemRenderer, passEvents, textRenderer, widthBACKGROUND_TEXTURE, GUI_ICONS_TEXTURE, STATS_ICON_TEXTURE| Constructor and Description |
|---|
BookEditScreen(PlayerEntity playerEntity,
ItemStack itemStack,
Hand hand) |
| Modifier and Type | Method and Description |
|---|---|
private void |
appendNewPage() |
boolean |
charTyped(char chr,
int keyCode) |
private int |
countPages() |
private BookEditScreen.PageContent |
createPageContent() |
private void |
finalizeBook(boolean signBook) |
private String |
getCurrentPageContent() |
private BookEditScreen.PageContent |
getPageContent() |
private int |
getStringWidth(String text) |
protected void |
init() |
private void |
invalidatePageContent() |
boolean |
keyPressed(int keyCode,
int scanCode,
int modifiers) |
private boolean |
keyPressedSignMode(int keyCode,
int scanCode,
int modifiers) |
private void |
method_27580(int int2) |
private void |
method_27581(MatrixStack matrixStack,
BookEditScreen.Position position,
boolean bool) |
private BookEditScreen.Position |
method_27582(BookEditScreen.Position position) |
private Rect2i |
method_27583(BookEditScreen.Position position,
BookEditScreen.Position position2) |
private void |
method_27584(String string) |
private Rect2i |
method_27585(String string,
TextHandler textHandler,
int int2,
int int3,
int int4,
int int5) |
private void |
method_27588(Rect2i[] rect2i) |
private void |
method_27589(int int2) |
private BookEditScreen.Position |
method_27590(BookEditScreen.Position position) |
private static int |
method_27591(int[] int2,
int int3) |
private boolean |
method_27592(int int2,
int int3,
int int4) |
private String |
method_27595() |
private void |
method_27597() |
private void |
method_27598() |
private void |
method_27872() |
boolean |
mouseClicked(double mouseX,
double mouseY,
int button) |
boolean |
mouseDragged(double mouseX,
double mouseY,
int button,
double deltaX,
double deltaY) |
private void |
moveCursorToBottom() |
private void |
moveCursorToTop() |
private void |
openNextPage() |
private void |
openPreviousPage() |
void |
removed() |
private void |
removeEmptyPages() |
void |
render(MatrixStack matrices,
int mouseX,
int mouseY,
float delta) |
private void |
setPageContent(String newContent) |
void |
tick() |
private void |
updateButtons() |
addButton, addChild, children, getNarrationMessage, getTitle, getTooltipFromItem, handleTextClick, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, method_29638, onClose, renderBackground, renderBackground, renderBackgroundTexture, renderTextHoverEffect, renderTooltip, renderTooltip, renderTooltip, resize, sendMessage, sendMessage, shouldCloseOnEsc, wrapScreenErrorgetFocused, isDragging, setDragging, setFocuseddrawCenteredString, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, setZOffsetclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitchangeFocus, focusOn, hoveredElement, keyReleased, mouseReleased, mouseScrolled, setInitialFocusmouseMovedprivate final PlayerEntity player
private final ItemStack itemStack
private boolean dirty
private boolean signing
private int tickCounter
private int currentPage
private String title
private final SelectionManager field_24269
private final SelectionManager field_24270
private long lastClickTime
private int lastClickIndex
private PageTurnWidget nextPageButton
private PageTurnWidget previousPageButton
private ButtonWidget doneButton
private ButtonWidget signButton
private ButtonWidget finalizeButton
private ButtonWidget cancelButton
private final Hand hand
@Nullable private BookEditScreen.PageContent pageContent
public BookEditScreen(PlayerEntity playerEntity, ItemStack itemStack, Hand hand)
private void method_27584(String string)
private String method_27595()
private int countPages()
public void tick()
tick in interface TickableElementtick in class Screenprivate void openPreviousPage()
private void openNextPage()
private void updateButtons()
private void removeEmptyPages()
private void finalizeBook(boolean signBook)
private void appendNewPage()
public boolean keyPressed(int keyCode,
int scanCode,
int modifiers)
keyPressed in interface ElementkeyPressed in interface ParentElementkeyPressed in class Screenpublic boolean charTyped(char chr,
int keyCode)
private boolean method_27592(int int2,
int int3,
int int4)
private void method_27597()
private void method_27598()
private void method_27580(int int2)
private void moveCursorToTop()
private void moveCursorToBottom()
private boolean keyPressedSignMode(int keyCode,
int scanCode,
int modifiers)
private String getCurrentPageContent()
private void setPageContent(String newContent)
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta)
private void method_27581(MatrixStack matrixStack, BookEditScreen.Position position, boolean bool)
private int getStringWidth(String text)
private void method_27588(Rect2i[] rect2i)
private BookEditScreen.Position method_27582(BookEditScreen.Position position)
private BookEditScreen.Position method_27590(BookEditScreen.Position position)
public boolean mouseClicked(double mouseX,
double mouseY,
int button)
private void method_27589(int int2)
public boolean mouseDragged(double mouseX,
double mouseY,
int button,
double deltaX,
double deltaY)
private BookEditScreen.PageContent getPageContent()
private void invalidatePageContent()
private void method_27872()
private BookEditScreen.PageContent createPageContent()
private static int method_27591(int[] int2,
int int3)
private Rect2i method_27585(String string, TextHandler textHandler, int int2, int int3, int int4, int int5)
private Rect2i method_27583(BookEditScreen.Position position, BookEditScreen.Position position2)