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 class(package private) static final recordNested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
Screen.NarratableSearchResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ResourceLocationprivate final Screenprivate static final intprivate static final intprivate final List<PopupScreen.ButtonOption> private final intprivate final ResourceLocationprivate static final intprivate static final intprivate final LinearLayoutprivate final Componentprivate final Runnableprivate static final intprivate static final intFields inherited from class net.minecraft.client.gui.screens.Screen
CUBE_MAP, font, FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, minecraft, narratorButton, PANORAMA, renderables, screenExecutor, title, widthFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
Constructor Summary
ConstructorsConstructorDescriptionPopupScreen(Screen backgroundScreen, int width, ResourceLocation image, Component title, Component message, List<PopupScreen.ButtonOption> buttons, Runnable onClose) -
Method Summary
Modifier and TypeMethodDescriptionvoidadded()private LinearLayoutprotected voidinit()voidonClose()voidrenderBackground(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) protected voidMethods inherited from class net.minecraft.client.gui.screens.Screen
addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, changeFocus, children, clearFocus, clearTooltipForNextRenderPass, clearWidgets, findNarratableWidget, getBackgroundMusic, getMinecraft, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, keyPressed, onFilesDrop, rebuildWidgets, removed, removeWidget, render, renderBlurredBackground, renderMenuBackground, renderMenuBackground, renderMenuBackgroundTexture, renderPanorama, renderTransparentBackground, renderWithTooltip, resize, setInitialFocus, setInitialFocus, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, shouldNarrateNavigation, tick, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, updateNarratorStatus, wrapScreenErrorMethods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocusedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
charTyped, getChildAt, getCurrentFocusPath, isFocused, keyReleased, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMovedMethods inherited from interface net.minecraft.client.gui.components.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
-
message
-
buttons
-
onClose
-
contentWidth
private final int contentWidth -
layout
-
-
Constructor Details
-
PopupScreen
PopupScreen(Screen backgroundScreen, int width, @Nullable ResourceLocation image, Component title, Component message, List<PopupScreen.ButtonOption> buttons, @Nullable Runnable onClose)
-
-
Method Details
-
added
public void added() -
init
protected void init() -
buildButtonRow
-
repositionElements
protected void repositionElements()- Overrides:
repositionElementsin classScreen
-
renderBackground
- Overrides:
renderBackgroundin classScreen
-
getNarrationMessage
- Overrides:
getNarrationMessagein classScreen
-
onClose
public void onClose()
-