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
Modifier and TypeClassDescriptionstatic class
(package private) static final record
Nested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
Screen.NarratableSearchResult
-
Field Summary
Modifier 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
BACKGROUND_LOCATION, font, height, minecraft, renderables, screenExecutor, title, width
Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
Constructor Summary
ConstructorDescriptionPopupScreen
(Screen p_304589_, int p_304486_, ResourceLocation p_304853_, Component p_304839_, Component p_304571_, List<PopupScreen.ButtonOption> p_304767_, Runnable p_304826_) -
Method Summary
Modifier and TypeMethodDescriptionvoid
added()
private LinearLayout
protected void
init()
void
onClose()
void
renderBackground
(GuiGraphics p_304909_, int p_304478_, int p_304974_, float p_304456_) protected void
Methods inherited from class net.minecraft.client.gui.screens.Screen
addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, changeFocus, children, clearFocus, clearWidgets, findNarratableWidget, getBackgroundMusic, getMinecraft, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, hideWidgets, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, keyPressed, narrationEnabled, onFilesDrop, rebuildWidgets, removed, removeWidget, render, renderDirtBackground, renderTransparentBackground, renderWithTooltip, resize, setInitialFocus, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, shouldNarrateNavigation, tick, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, 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, magicalSpecialHackyFocus, 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 p_304589_, int p_304486_, @Nullable ResourceLocation p_304853_, Component p_304839_, Component p_304571_, List<PopupScreen.ButtonOption> p_304767_, @Nullable Runnable p_304826_)
-
-
Method Details
-
added
public void added() -
init
protected void init() -
buildButtonRow
-
repositionElements
protected void repositionElements()- Overrides:
repositionElements
in classScreen
-
renderBackground
- Overrides:
renderBackground
in classScreen
-
getNarrationMessage
- Overrides:
getNarrationMessage
in classScreen
-
onClose
public void onClose()
-