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 record
Nested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
Screen.NarratableSearchResult
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ResourceLocation
private final Screen
private static final int
private static final int
private final List
<PopupScreen.ButtonOption> private final int
private final ResourceLocation
private static final int
private static final int
private final LinearLayout
private final Component
private final Runnable
private static final int
private static final int
Fields 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, width
Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
Constructor Summary
ConstructorsConstructorDescriptionPopupScreen
(Screen pBackgroundScreen, int pWidth, ResourceLocation pImage, Component pTitle, Component pMessage, List<PopupScreen.ButtonOption> pButtons, Runnable pOnClose) -
Method Summary
Modifier and TypeMethodDescriptionvoid
added()
private LinearLayout
protected void
init()
void
onClose()
void
renderBackground
(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) protected void
Methods 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, wrapScreenError
Methods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocused
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.components.events.ContainerEventHandler
charTyped, getChildAt, getCurrentFocusPath, isFocused, keyReleased, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, setFocused
Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMoved
Methods 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 pBackgroundScreen, int pWidth, @Nullable ResourceLocation pImage, Component pTitle, Component pMessage, List<PopupScreen.ButtonOption> pButtons, @Nullable Runnable pOnClose)
-
-
Method Details
-
added
public void added() -
init
protected void init() -
buildButtonRow
-
repositionElements
protected void repositionElements()- Overrides:
repositionElements
in classScreen
-
renderBackground
public void renderBackground(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) - Overrides:
renderBackground
in classScreen
-
getNarrationMessage
- Overrides:
getNarrationMessage
in classScreen
-
onClose
public void onClose()
-