Class ConfirmPopup
java.lang.Object
johnsmith.configoverhauled.api.client.gui.popup.AbstractConfigPopup<Void>
johnsmith.configoverhauled.impl.client.gui.popup.ConfirmPopup
- All Implemented Interfaces:
ConfigPopup, net.minecraft.client.gui.components.events.GuiEventListener, net.minecraft.client.gui.components.TabOrderedElement
Compact modal confirmation dialog built on
AbstractConfigPopup.-
Field Summary
Fields inherited from class AbstractConfigPopup
applyButton, BACKDROP_COLOR, BORDER_COLOR, cancelButton, contentHeight, contentLeft, contentTop, contentWidth, copyIdButton, description, DESCRIPTION_COLOR, DIVIDER_COLOR, font, footerHeight, FRAME_BG_COLOR, FRAME_PADDING, frameHeight, frameLeft, frameTop, frameWidth, HEADER_BG_COLOR, headerHeight, isLocked, minecraft, onApply, parentScreen, property, resetButton, screenHeight, screenWidth, title, TITLE_COLOR -
Constructor Summary
ConstructorsConstructorDescriptionConfirmPopup(ConfigScreen parentScreen, net.minecraft.client.Minecraft minecraft, net.minecraft.network.chat.Component title, net.minecraft.network.chat.Component message, net.minecraft.network.chat.Component confirmLabel, Runnable onConfirm) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidextractBody(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int mouseX, int mouseY, float partialTick) Renders custom non-widget content inside the popup body (drawn beneath child widgets).protected net.minecraft.network.chat.Componentprotected intprotected intprotected voidinitContent(int left, int top, int width, int height) Initializes the popup's body widgets inside the provided inner content bounds.booleankeyPressed(net.minecraft.client.input.KeyEvent event) protected booleanMethods inherited from class AbstractConfigPopup
addListener, addRenderableWidget, applyAndClose, buildResultValue, canResetWorkingValue, charTyped, clearWidgets, dismiss, extractBackdrop, extractForeground, extractFrame, extractHeader, extractRenderState, getCancelButtonLabel, getDefaultValueTooltip, getFocusedWidget, getHeaderRightPadding, getMaxDescriptionLines, getResetButtonLabel, init, initFooter, initHeaderWidgets, isInsideFrame, isWorkingValueValid, keyReleased, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, removeWidget, resetWorkingValue, setFocusedWidget, showCopyIdButton, showFooter, updateFooterButtonsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ConfigPopup
closeOnEscape, closeOnOutsideClick, isFocused, onClose, setFocused, tickMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
getBorderForArrowNavigation, getCurrentFocusPath, getRectangle, isMouseOver, mouseMoved, nextFocusPath, preeditUpdated, shouldTakeFocusAfterInteractionMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Constructor Details
-
ConfirmPopup
public ConfirmPopup(ConfigScreen parentScreen, net.minecraft.client.Minecraft minecraft, net.minecraft.network.chat.Component title, net.minecraft.network.chat.Component message, net.minecraft.network.chat.Component confirmLabel, Runnable onConfirm)
-
-
Method Details
-
getPreferredWidth
protected int getPreferredWidth()- Overrides:
getPreferredWidthin classAbstractConfigPopup<Void>
-
getPreferredHeight
protected int getPreferredHeight()- Overrides:
getPreferredHeightin classAbstractConfigPopup<Void>
-
showResetButton
protected boolean showResetButton()- Overrides:
showResetButtonin classAbstractConfigPopup<Void>
-
getApplyButtonLabel
protected net.minecraft.network.chat.Component getApplyButtonLabel()- Overrides:
getApplyButtonLabelin classAbstractConfigPopup<Void>
-
initContent
protected void initContent(int left, int top, int width, int height) Description copied from class:AbstractConfigPopupInitializes the popup's body widgets inside the provided inner content bounds.- Specified by:
initContentin classAbstractConfigPopup<Void>
-
extractBody
protected void extractBody(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int mouseX, int mouseY, float partialTick) Description copied from class:AbstractConfigPopupRenders custom non-widget content inside the popup body (drawn beneath child widgets).- Overrides:
extractBodyin classAbstractConfigPopup<Void>
-
keyPressed
public boolean keyPressed(net.minecraft.client.input.KeyEvent event) - Specified by:
keyPressedin interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
keyPressedin classAbstractConfigPopup<Void>
-