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(@NotNull GuiParent<?> parent,
@Nullable net.minecraft.network.chat.Component title,
net.minecraft.network.chat.Component dialogText,
int width) static GuiDialoginfoDialog(@NotNull GuiParent<?> parent,
@Nullable net.minecraft.network.chat.Component title,
net.minecraft.network.chat.Component dialogText,
int width,
@Nullable Runnable okAction) static GuiDialoginfoDialog(@NotNull GuiParent<?> parent,
net.minecraft.network.chat.Component dialogText,
int width) booleankeyPressed(int key,
int scancode,
int modifiers) booleanmouseClicked(double mouseX,
double mouseY,
int button) static GuiDialog.Optionstatic GuiDialogoptionsDialog(@NotNull GuiParent<?> parent,
@Nullable net.minecraft.network.chat.Component title,
net.minecraft.network.chat.Component dialogText,
int width,
GuiDialog.Option... options) static GuiDialogoptionsDialog(@NotNull 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(@NotNull 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, getCombinedElementDepth, 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, setZStacking, showToolTip, tick, toString, updateMouseOver, updateScreenData, zStackingaddBoundsToRect, 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(int, int, int, boolean)
Note: You do not need to call super when overriding this interface method.
key - the keyboard key that was pressed.scancode - the system-specific scancode of the keymodifiers - bitfield describing which modifier keys were held down.ElementEventsElementEvents.mouseClicked(double, double, int, boolean)
Note: You do not need to call super when overriding this interface method.
mouseX - Mouse X positionmouseY - Mouse Y positionbutton - Mouse Buttonparent - 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.