Package net.minecraft.client.gui.screen
Class EditBookScreen
java.lang.Object
net.minecraft.client.gui.AbstractGui
net.minecraft.client.gui.FocusableGui
net.minecraft.client.gui.screen.Screen
net.minecraft.client.gui.screen.EditBookScreen
- All Implemented Interfaces:
IGuiEventListener
,INestedGuiEventHandler
,IRenderable
,IScreen
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static class
(package private) static class
(package private) static class
-
Field Summary
Modifier and TypeFieldDescriptionprivate ChangePageButton
private static final IReorderingProcessor
private final ItemStack
private Button
private int
private EditBookScreen.BookPage
private Button
private static final ITextComponent
private static final ITextComponent
private Button
private ChangePageButton
private int
private static final IReorderingProcessor
private final Hand
private boolean
private boolean
private long
private int
private final PlayerEntity
private final ITextComponent
private final TextInputUtil
private ITextComponent
private Button
private String
private final TextInputUtil
Fields inherited from class net.minecraft.client.gui.screen.Screen
buttons, children, font, height, itemRenderer, minecraft, passEvents, width
Fields inherited from class net.minecraft.client.gui.AbstractGui
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION
-
Constructor Summary
ConstructorDescriptionEditBookScreen
(PlayerEntity p_i51100_1_, ItemStack p_i51100_2_, Hand p_i51100_3_) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
private boolean
bookKeyPressed
(int p_214230_1_, int p_214230_2_, int p_214230_3_) private void
changeLine
(int p_238755_1_) boolean
charTyped
(char p_231042_1_, int p_231042_2_) private void
private void
private EditBookScreen.Point
convertLocalToScreen
(EditBookScreen.Point p_238767_1_) private EditBookScreen.Point
convertScreenToLocal
(EditBookScreen.Point p_238758_1_) private Rectangle2d
createPartialLineSelection
(String p_238761_1_, CharacterManager p_238761_2_, int p_238761_3_, int p_238761_4_, int p_238761_5_, int p_238761_6_) private Rectangle2d
createSelection
(EditBookScreen.Point p_238759_1_, EditBookScreen.Point p_238759_2_) private void
private static int
findLineFromPos
(int[] p_238768_0_, int p_238768_1_) private String
private String
private EditBookScreen.BookPage
private int
protected void
init()
private void
keyDown()
private void
keyEnd()
private void
keyHome()
boolean
keyPressed
(int p_231046_1_, int p_231046_2_, int p_231046_3_) private void
keyUp()
boolean
mouseClicked
(double p_231044_1_, double p_231044_3_, int p_231044_5_) boolean
mouseDragged
(double p_231045_1_, double p_231045_3_, int p_231045_5_, double p_231045_6_, double p_231045_8_) private void
pageBack()
private void
private EditBookScreen.BookPage
void
removed()
void
render
(MatrixStack p_230430_1_, int p_230430_2_, int p_230430_3_, float p_230430_4_) private void
renderCursor
(MatrixStack p_238756_1_, EditBookScreen.Point p_238756_2_, boolean p_238756_3_) private void
renderHighlight
(Rectangle2d[] p_238764_1_) private void
saveChanges
(boolean p_214198_1_) private void
selectWord
(int p_238765_1_) private void
setClipboard
(String p_238760_1_) private void
setCurrentPageText
(String p_214217_1_) void
tick()
private boolean
titleKeyPressed
(int p_214196_1_, int p_214196_2_, int p_214196_3_) private void
Methods inherited from class net.minecraft.client.gui.screen.Screen
addButton, addWidget, children, getMinecraft, getNarrationMessage, getTitle, getTooltipFromItem, handleComponentClicked, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, onClose, onFilesDrop, renderBackground, renderBackground, renderComponentHoverEffect, renderComponentTooltip, renderDirtBackground, renderTooltip, renderTooltip, renderTooltip, renderToolTip, renderWrappedToolTip, resize, sendMessage, sendMessage, shouldCloseOnEsc, wrapScreenError
Methods inherited from class net.minecraft.client.gui.FocusableGui
getFocused, isDragging, setDragging, setFocused
Methods inherited from class net.minecraft.client.gui.AbstractGui
blit, blit, blit, blit, blit, blitOutlineBlack, drawCenteredString, drawCenteredString, drawString, drawString, fill, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, vLine
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.IGuiEventListener
mouseMoved
Methods inherited from interface net.minecraft.client.gui.INestedGuiEventHandler
changeFocus, getChildAt, keyReleased, magicalSpecialHackyFocus, mouseReleased, mouseScrolled, setInitialFocus
-
Field Details
-
EDIT_TITLE_LABEL
-
FINALIZE_WARNING_LABEL
-
BLACK_CURSOR
-
GRAY_CURSOR
-
owner
-
book
-
isModified
private boolean isModified -
isSigning
private boolean isSigning -
frameTick
private int frameTick -
currentPage
private int currentPage -
pages
-
title
-
pageEdit
-
titleEdit
-
lastClickTime
private long lastClickTime -
lastIndex
private int lastIndex -
forwardButton
-
backButton
-
doneButton
-
signButton
-
finalizeButton
-
cancelButton
-
hand
-
displayCache
-
pageMsg
-
ownerText
-
-
Constructor Details
-
EditBookScreen
-
-
Method Details
-
setClipboard
-
getClipboard
-
getNumPages
private int getNumPages() -
tick
public void tick() -
init
protected void init() -
pageBack
private void pageBack() -
pageForward
private void pageForward() -
removed
public void removed() -
updateButtonVisibility
private void updateButtonVisibility() -
eraseEmptyTrailingPages
private void eraseEmptyTrailingPages() -
saveChanges
private void saveChanges(boolean p_214198_1_) -
appendPageToBook
private void appendPageToBook() -
keyPressed
public boolean keyPressed(int p_231046_1_, int p_231046_2_, int p_231046_3_) - Specified by:
keyPressed
in interfaceIGuiEventListener
- Specified by:
keyPressed
in interfaceINestedGuiEventHandler
- Overrides:
keyPressed
in classScreen
-
charTyped
public boolean charTyped(char p_231042_1_, int p_231042_2_) -
bookKeyPressed
private boolean bookKeyPressed(int p_214230_1_, int p_214230_2_, int p_214230_3_) -
keyUp
private void keyUp() -
keyDown
private void keyDown() -
changeLine
private void changeLine(int p_238755_1_) -
keyHome
private void keyHome() -
keyEnd
private void keyEnd() -
titleKeyPressed
private boolean titleKeyPressed(int p_214196_1_, int p_214196_2_, int p_214196_3_) -
getCurrentPageText
-
setCurrentPageText
-
render
- Specified by:
render
in interfaceIRenderable
- Overrides:
render
in classScreen
-
renderCursor
private void renderCursor(MatrixStack p_238756_1_, EditBookScreen.Point p_238756_2_, boolean p_238756_3_) -
renderHighlight
-
convertScreenToLocal
-
convertLocalToScreen
-
mouseClicked
public boolean mouseClicked(double p_231044_1_, double p_231044_3_, int p_231044_5_) -
selectWord
private void selectWord(int p_238765_1_) -
mouseDragged
public boolean mouseDragged(double p_231045_1_, double p_231045_3_, int p_231045_5_, double p_231045_6_, double p_231045_8_) -
getDisplayCache
-
clearDisplayCache
private void clearDisplayCache() -
clearDisplayCacheAfterPageChange
private void clearDisplayCacheAfterPageChange() -
rebuildDisplayCache
-
findLineFromPos
private static int findLineFromPos(int[] p_238768_0_, int p_238768_1_) -
createPartialLineSelection
private Rectangle2d createPartialLineSelection(String p_238761_1_, CharacterManager p_238761_2_, int p_238761_3_, int p_238761_4_, int p_238761_5_, int p_238761_6_) -
createSelection
private Rectangle2d createSelection(EditBookScreen.Point p_238759_1_, EditBookScreen.Point p_238759_2_)
-