Class DialogScreen<T extends Dialog>
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.dialog.DialogScreen<T>
- All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Renderable, TabOrderedElement
- Direct Known Subclasses:
ButtonListDialogScreen, SimpleDialogScreen
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class Screen
Screen.NarratableSearchResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate @Nullable ScrollableLayoutprivate final DialogConnectionAccessprivate final Tstatic final Componentprivate final HeaderAndFooterLayoutprivate Supplier<Optional<ClickEvent>> private final @Nullable Screenprivate static final intprivate static final WidgetSpritesprivate ButtonFields 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
ConstructorsConstructorDescriptionDialogScreen(@Nullable Screen previousScreen, T dialog, DialogConnectionAccess connectionAccess) -
Method Summary
Modifier and TypeMethodDescriptionprotected LayoutElementprivate Buttonprivate voidhandleDialogClickEvent(ClickEvent event, @Nullable Screen activeScreen) protected final voidinit()booleanprotected voidvoidonClose()protected static LayoutElementpackControlsIntoColumns(List<? extends LayoutElement> controls, int columns) protected voidpopulateBodyElements(LinearLayout layout, DialogControlSet controlSet, T dialog, DialogConnectionAccess connectionAccess) @Nullable Screenprotected voidvoidrunAction(Optional<ClickEvent> closeAction) voidrunAction(Optional<ClickEvent> closeAction, DialogAction afterAction) booleanprotected voidupdateHeaderAndFooter(HeaderAndFooterLayout layout, DialogControlSet controlSet, T dialog, DialogConnectionAccess connectionAccess) 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, isInGameUi, isMouseOver, isValidCharacterForName, keyPressed, onFilesDrop, panoramaShouldSpin, rebuildWidgets, removed, removeWidget, render, renderBackground, renderBlurredBackground, renderMenuBackground, renderMenuBackground, renderMenuBackgroundTexture, renderPanorama, renderTransparentBackground, renderWithTooltipAndSubtitles, resize, setInitialFocus, setInitialFocus, 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
-
DISCONNECT
-
WARNING_BUTTON_SIZE
private static final int WARNING_BUTTON_SIZE- See Also:
-
WARNING_BUTTON_SPRITES
-
dialog
-
layout
-
previousScreen
-
bodyScroll
-
warningButton
-
connectionAccess
-
onClose
-
-
Constructor Details
-
DialogScreen
public DialogScreen(@Nullable Screen previousScreen, T dialog, DialogConnectionAccess connectionAccess)
-
-
Method Details
-
init
-
populateBodyElements
protected void populateBodyElements(LinearLayout layout, DialogControlSet controlSet, T dialog, DialogConnectionAccess connectionAccess) -
repositionElements
protected void repositionElements()- Overrides:
repositionElementsin classScreen
-
createTitleWithWarningButton
-
makeSureWarningButtonIsInBounds
protected void makeSureWarningButtonIsInBounds() -
createWarningButton
-
isPauseScreen
public boolean isPauseScreen()- Overrides:
isPauseScreenin classScreen
-
shouldCloseOnEsc
public boolean shouldCloseOnEsc()- Overrides:
shouldCloseOnEscin classScreen
-
onClose
-
runAction
-
runAction
-
handleDialogClickEvent
-
previousScreen
-
packControlsIntoColumns
protected static LayoutElement packControlsIntoColumns(List<? extends LayoutElement> controls, int columns)
-