primary
public static GuiDialog.Option primary(net.minecraft.network.chat.Component text,
@Nullable
@Nullable Runnable action)
Create a green "Primary" button option.
ElementEvents, GuiParent<GuiDialog>, TooltipHandler<GuiDialog>Created by brandon3055 on 14/12/2023
hoverTime, initializedstatic GuiDialog.Optionvoidclose()static GuiDialoginfoDialog(GuiParent<?> parent,
@Nullable net.minecraft.network.chat.Component title,
net.minecraft.network.chat.Component dialogText,
int width) static GuiDialoginfoDialog(GuiParent<?> parent,
@Nullable net.minecraft.network.chat.Component title,
net.minecraft.network.chat.Component dialogText,
int width,
@Nullable Runnable okAction) static GuiDialoginfoDialog(GuiParent<?> parent,
net.minecraft.network.chat.Component dialogText,
int width) booleankeyPressed(net.minecraft.client.input.KeyEvent event) booleanmouseClicked(net.minecraft.client.input.MouseButtonEvent event) static GuiDialog.Optionstatic GuiDialogoptionsDialog(GuiParent<?> parent,
@Nullable net.minecraft.network.chat.Component title,
net.minecraft.network.chat.Component dialogText,
int width,
GuiDialog.Option... options) static GuiDialogoptionsDialog(GuiParent<?> parent,
@Nullable net.minecraft.network.chat.Component title,
net.minecraft.network.chat.Component dialogText,
Function<GuiDialog,GuiElement<?>> backgroundBuilder,
BiFunction<GuiDialog,GuiDialog.Option,GuiButton> buttonBuilder,
int width,
GuiDialog.Option... options) static GuiDialogoptionsDialog(GuiParent<?> parent,
net.minecraft.network.chat.Component dialogText,
int width,
GuiDialog.Option... options) static GuiDialog.OptionsetBlockKeyInput(boolean blockKeyInput) setBlockMouseInput(boolean blockMouseInput) addChild, addJeiDropTargets, addJeiExclusions, adoptChild, applyQueuedChildUpdates, blockMouseEvents, blockMouseOver, bringChildToForeground, font, getChildren, getJeiDropConsumer, getModularGui, getParent, getTooltip, getTooltipDelay, hoverTime, initElement, isDescendantOf, isEnabled, isJeiDropTarget, isJeiExcluded, isMouseOver, isOpaque, isRemoved, isTooltipEnabled, jeiExclude, mc, onScreenInit, removeChild, render, renderChild, renderOverlay, scaledScreenHeight, scaledScreenWidth, sendChildToBackground, sendChildToIndex, setEnabled, setEnabled, setEnableToolTip, setJeiDropTarget, setJeiExcluded, setOpaque, setRenderCull, setTooltip, setTooltipDelay, showToolTip, tick, toString, updateMouseOver, updateScreenDataaddBoundsToRect, clearConstraints, clearGeometryCache, constrain, get, getChildBounds, getEnclosingRect, getParent, getPosition, getRectangle, placeInside, placeInside, placeOutside, placeOutside, setHeight, setPos, setSize, setWidth, setXPos, setYPos, strictMode, validate, xCenter, xMax, xMin, xSize, yCenter, yMax, yMin, ySizeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcharTyped, charTyped, keyPressed, keyReleased, keyReleased, mouseClicked, mouseMoved, mouseReleased, mouseReleased, mouseScrolled, mouseScrolledaddChild, getValuerenderTooltip, setTooltip, setTooltip, setTooltip, setTooltipSingle, setTooltipSingleparent - Can be any gui element (Will just be used to get the root element)title - Sets a separate title that will be displayed above the main dialog text. (Optional)dialogText - The main dialog text.width - The dialog width, (Height will automatically adjust based on content.)options - The list of options for this dialog.parent - Can be any gui element (Will just be used to get the root element)dialogText - The main dialog text.width - The dialog width, (Height will automatically adjust based on content.)options - The list of options for this dialog.parent - Can be any gui element (Will just be used to get the root element)title - Sets a separate title that will be displayed above the main dialog text. (Optional)dialogText - The main dialog text.width - The dialog width, (Height will automatically adjust based on content.)parent - Can be any gui element (Will just be used to get the root element)title - Sets a separate title that will be displayed above the main dialog text. (Optional)dialogText - The main dialog text.width - The dialog width, (Height will automatically adjust based on content.)parent - Can be any gui element (Will just be used to get the root element)dialogText - The main dialog text.width - The dialog width, (Height will automatically adjust based on content.)blockKeyInput - Prevent keyboard inputs from being sent to the rest of the gui while this dialog is open.
Default: true.blockMouseInput - Prevent mouse inputs from being sent to the rest of the gui while this dialog is open.
Default: true.ElementEventsElementEvents.keyPressed(KeyEvent, boolean)
Note: You do not need to call super when overriding this interface method.
event - The key event. Key, scancode, and modifiers.ElementEventsElementEvents.mouseClicked(MouseButtonEvent, boolean)
Note: You do not need to call super when overriding this interface method.
event - The mouse button event. Position, Key, and modifiers.parent - Can be any gui element (Will just be used to get the root element)title - Sets a separate title that will be displayed above the main dialog text. (Optional)dialogText - The main dialog text.backgroundBuilder - A function that is used to create the background of the dialog.buttonBuilder - A function that is used to create the dialog buttons.width - The dialog width, (Height will automatically adjust based on content.)options - The list of options for this dialog.