Class ListDetailPopup<E>
java.lang.Object
johnsmith.configoverhauled.api.client.gui.popup.AbstractConfigPopup<List<E>>
johnsmith.configoverhauled.impl.client.gui.popup.ListDetailPopup<E>
- Type Parameters:
E- The list element type.
- All Implemented Interfaces:
ConfigPopup, net.minecraft.client.gui.components.events.GuiEventListener, net.minecraft.client.gui.components.TabOrderedElement
Structured modal list editor for
Property<List<E>> entries.
Supports add, remove, reorder (up/down), scrollable scissor-clipped row editing with
per-element Codec validation, a plain-string fast path for Codec.STRING,
and a lossless toggle to a Raw JSON array editor.
-
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
ConstructorsConstructorDescriptionListDetailPopup(ConfigScreen parentScreen, net.minecraft.client.Minecraft minecraft, Property<List<E>> property, String initialJsonText, boolean isLocked, Consumer<List<E>> onApply) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanprotected 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.protected booleanbooleankeyPressed(net.minecraft.client.input.KeyEvent event) booleanmouseClicked(net.minecraft.client.input.MouseButtonEvent event, boolean doubleClick) booleanmouseDragged(net.minecraft.client.input.MouseButtonEvent event, double dragX, double dragY) booleanmouseReleased(net.minecraft.client.input.MouseButtonEvent event) booleanmouseScrolled(double mouseX, double mouseY, double scrollX, double scrollY) protected voidMethods inherited from class AbstractConfigPopup
addListener, addRenderableWidget, applyAndClose, charTyped, clearWidgets, dismiss, extractBackdrop, extractForeground, extractFrame, extractHeader, extractRenderState, getApplyButtonLabel, getCancelButtonLabel, getFocusedWidget, getHeaderRightPadding, getMaxDescriptionLines, getResetButtonLabel, init, initFooter, initHeaderWidgets, isInsideFrame, keyReleased, onClose, removeWidget, setFocusedWidget, showCopyIdButton, showFooter, showResetButton, updateFooterButtonsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ConfigPopup
closeOnEscape, closeOnOutsideClick, isFocused, setFocused, tickMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
capturesInput, getBorderForArrowNavigation, getCurrentFocusPath, getRectangle, isMouseOver, mouseMoved, nextFocusPath, preeditUpdated, shouldTakeFocusAfterInteractionMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Constructor Details
-
ListDetailPopup
-
-
Method Details
-
getPreferredWidth
protected int getPreferredWidth()- Overrides:
getPreferredWidthin classAbstractConfigPopup<List<E>>
-
getPreferredHeight
protected int getPreferredHeight()- Overrides:
getPreferredHeightin classAbstractConfigPopup<List<E>>
-
getDefaultValueTooltip
protected net.minecraft.network.chat.Component getDefaultValueTooltip()- Overrides:
getDefaultValueTooltipin classAbstractConfigPopup<List<E>>
-
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<List<E>>
-
isWorkingValueValid
protected boolean isWorkingValueValid()- Overrides:
isWorkingValueValidin classAbstractConfigPopup<List<E>>
-
canResetWorkingValue
protected boolean canResetWorkingValue()- Overrides:
canResetWorkingValuein classAbstractConfigPopup<List<E>>
-
resetWorkingValue
protected void resetWorkingValue()- Overrides:
resetWorkingValuein classAbstractConfigPopup<List<E>>
-
buildResultValue
- Overrides:
buildResultValuein classAbstractConfigPopup<List<E>>
-
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<List<E>>
-
mouseClicked
public boolean mouseClicked(net.minecraft.client.input.MouseButtonEvent event, boolean doubleClick) - Specified by:
mouseClickedin interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
mouseClickedin classAbstractConfigPopup<List<E>>
-
mouseDragged
public boolean mouseDragged(net.minecraft.client.input.MouseButtonEvent event, double dragX, double dragY) - Specified by:
mouseDraggedin interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
mouseDraggedin classAbstractConfigPopup<List<E>>
-
mouseReleased
public boolean mouseReleased(net.minecraft.client.input.MouseButtonEvent event) - Specified by:
mouseReleasedin interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
mouseReleasedin classAbstractConfigPopup<List<E>>
-
mouseScrolled
public boolean mouseScrolled(double mouseX, double mouseY, double scrollX, double scrollY) - Specified by:
mouseScrolledin interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
mouseScrolledin classAbstractConfigPopup<List<E>>
-
keyPressed
public boolean keyPressed(net.minecraft.client.input.KeyEvent event) - Specified by:
keyPressedin interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
keyPressedin classAbstractConfigPopup<List<E>>
-