Class PopupScreen
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.components.PopupScreen
- All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Renderable, TabOrderedElement
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classprivate static final recordNested classes/interfaces inherited from class Screen
Screen.NarratableSearchResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Identifierprivate final @Nullable Screenprivate static final intprivate static final intprivate final List<PopupScreen.ButtonOption> private final intprivate final @Nullable Identifierprivate static final intprivate static final intprivate final LinearLayoutprivate final @Nullable Runnableprivate static final intprivate static final intFields 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
ConstructorsModifierConstructorDescriptionprivatePopupScreen(@Nullable Screen backgroundScreen, int backgroundWidth, @Nullable Identifier image, Component title, List<Component> messages, List<PopupScreen.ButtonOption> buttons, @Nullable Runnable onClose) -
Method Summary
Modifier and TypeMethodDescriptionvoidadded()private LinearLayoutprotected voidinit()voidonClose()voidrenderBackground(GuiGraphics graphics, int mouseX, int mouseY, float a) protected voidMethods inherited from class Screen
addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, canInterruptWithAnotherScreen, changeFocus, children, clearFocus, clearWidgets, clickCommandAction, clickUrlAction, defaultHandleClickEvent, defaultHandleGameClickEvent, fadeWidgets, fillCrashDetails, findNarratableWidget, getBackgroundMusic, getFont, getMinecraft, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleDelayedNarration, init, insertText, isAllowedInPortal, isInGameUi, isMouseOver, isPauseScreen, isValidCharacterForName, keyPressed, onFilesDrop, panoramaShouldSpin, rebuildWidgets, removed, removeWidget, render, renderBlurredBackground, renderMenuBackground, renderMenuBackground, renderMenuBackgroundTexture, renderPanorama, renderTransparentBackground, renderWithTooltipAndSubtitles, resize, setInitialFocus, setInitialFocus, shouldCloseOnEsc, shouldNarrateNavigation, showsActiveEffects, tick, 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
charTyped, getBorderForArrowNavigation, getChildAt, getCurrentFocusPath, isFocused, keyReleased, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, setFocusedMethods inherited from interface GuiEventListener
mouseMoved, shouldTakeFocusAfterInteractionMethods inherited from interface TabOrderedElement
getTabOrderGroup
-
Field Details
-
BACKGROUND_SPRITE
-
SPACING
private static final int SPACING- See Also:
-
BG_BORDER_WITH_SPACING
private static final int BG_BORDER_WITH_SPACING- See Also:
-
BUTTON_SPACING
private static final int BUTTON_SPACING- See Also:
-
IMAGE_SIZE_X
private static final int IMAGE_SIZE_X- See Also:
-
IMAGE_SIZE_Y
private static final int IMAGE_SIZE_Y- See Also:
-
POPUP_DEFAULT_WIDTH
private static final int POPUP_DEFAULT_WIDTH- See Also:
-
backgroundScreen
-
image
-
messages
-
buttons
-
onClose
-
contentWidth
private final int contentWidth -
layout
-
-
Constructor Details
-
PopupScreen
private PopupScreen(@Nullable Screen backgroundScreen, int backgroundWidth, @Nullable Identifier image, Component title, List<Component> messages, List<PopupScreen.ButtonOption> buttons, @Nullable Runnable onClose)
-
-
Method Details
-
added
-
init
-
buildButtonRow
-
repositionElements
protected void repositionElements()- Overrides:
repositionElementsin classScreen
-
renderBackground
- Overrides:
renderBackgroundin classScreen
-
getNarrationMessage
- Overrides:
getNarrationMessagein classScreen
-
onClose
-