Class AbstractSignEditScreen
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.inventory.AbstractSignEditScreen
- All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Renderable, TabOrderedElement
- Direct Known Subclasses:
HangingSignEditScreen, SignEditScreen
-
Nested Class Summary
Nested classes/interfaces inherited from class Screen
Screen.NarratableSearchResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intCounts the number of screen updates.private final booleanprivate intThe index of the line that is being edited.private final String[]protected final SignBlockEntityReference to the sign object.private @Nullable TextFieldHelperprivate SignTextprotected final WoodTypeFields inherited from class Screen
FADE_IN_TIME, font, FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, minecraft, narratorButton, renderables, screenExecutor, title, width -
Constructor Summary
ConstructorsConstructorDescriptionAbstractSignEditScreen(SignBlockEntity sign, boolean isFrontText, boolean shouldFilter) AbstractSignEditScreen(SignBlockEntity sign, boolean isFrontText, boolean shouldFilter, Component title) -
Method Summary
Modifier and TypeMethodDescriptionbooleancharTyped(CharacterEvent event) protected abstract Vector3fprotected abstract floatprotected voidinit()booleanbooleanprivate booleanisValid()booleankeyPressed(KeyEvent event) voidonClose()private voidonDone()voidremoved()voidrender(GuiGraphics graphics, int mouseX, int mouseY, float a) Renders the graphical user interface (GUI) element.private voidrenderSign(GuiGraphics graphics) protected abstract voidrenderSignBackground(GuiGraphics graphics) private voidrenderSignText(GuiGraphics graphics) private voidsetMessage(String message) voidtick()Methods inherited from class Screen
added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, canInterruptWithAnotherScreen, changeFocus, children, clearFocus, clearWidgets, clickCommandAction, clickUrlAction, defaultHandleClickEvent, defaultHandleGameClickEvent, fadeWidgets, fillCrashDetails, findNarratableWidget, getBackgroundMusic, getFont, getMinecraft, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleDelayedNarration, init, insertText, isAllowedInPortal, isMouseOver, isValidCharacterForName, onFilesDrop, panoramaShouldSpin, rebuildWidgets, removeWidget, renderBackground, renderBlurredBackground, renderMenuBackground, renderMenuBackground, renderMenuBackgroundTexture, renderPanorama, renderTransparentBackground, renderWithTooltipAndSubtitles, repositionElements, resize, setInitialFocus, setInitialFocus, shouldCloseOnEsc, shouldNarrateNavigation, showsActiveEffects, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, updateNarratorStatusMethods inherited from class AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocusedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ContainerEventHandler
getBorderForArrowNavigation, getChildAt, getCurrentFocusPath, isFocused, keyReleased, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, setFocusedMethods inherited from interface GuiEventListener
mouseMoved, shouldTakeFocusAfterInteractionMethods inherited from interface TabOrderedElement
getTabOrderGroup
-
Field Details
-
sign
Reference to the sign object. -
text
-
messages
-
isFrontText
private final boolean isFrontText -
woodType
-
frame
private int frameCounts the number of screen updates. -
line
private int lineThe index of the line that is being edited. -
signField
-
-
Constructor Details
-
AbstractSignEditScreen
-
AbstractSignEditScreen
public AbstractSignEditScreen(SignBlockEntity sign, boolean isFrontText, boolean shouldFilter, Component title)
-
-
Method Details
-
init
-
tick
-
isValid
private boolean isValid() -
keyPressed
- Specified by:
keyPressedin interfaceContainerEventHandler- Specified by:
keyPressedin interfaceGuiEventListener- Overrides:
keyPressedin classScreen
-
charTyped
-
render
Description copied from interface:RenderableRenders the graphical user interface (GUI) element.- Specified by:
renderin interfaceRenderable- Overrides:
renderin classScreen- Parameters:
graphics- the GuiGraphics object used for rendering.mouseX- the x-coordinate of the mouse cursor.mouseY- the y-coordinate of the mouse cursor.a- the partial tick time.
-
onClose
-
removed
-
isPauseScreen
public boolean isPauseScreen()- Overrides:
isPauseScreenin classScreen
-
isInGameUi
public boolean isInGameUi()- Overrides:
isInGameUiin classScreen
-
renderSignBackground
-
getSignTextScale
-
getSignYOffset
protected abstract float getSignYOffset() -
renderSign
-
renderSignText
-
setMessage
-
onDone
private void onDone()
-