Class CategoryPopup
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.ixdarklord.coolcatcore.internal.config.client.gui.style.StyledPopup
net.ixdarklord.coolcatcore.internal.config.client.gui.CategoryPopup
- All Implemented Interfaces:
net.minecraft.client.gui.components.events.ContainerEventHandler,net.minecraft.client.gui.components.events.GuiEventListener,net.minecraft.client.gui.components.Renderable,net.minecraft.client.gui.components.TabOrderedElement
One category of a config in a small window: that group's settings (its nested groups as sections), or a single
setting, with Save and Cancel. It floats over whatever screen opened it, or over the game when opened from a key.
It edits like the full config screen: pending changes, validation, dependencies, and the server's values for a
synced config.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.Screen.NarratableSearchResult -
Field Summary
Fields inherited from class net.ixdarklord.coolcatcore.internal.config.client.gui.style.StyledPopup
FOOTER, PADDING, panelHeight, panelWidth, panelX, panelY, parent, theme, TITLE_HEIGHTFields inherited from class net.minecraft.client.gui.screens.Screen
BACKGROUND_LOCATION, font, height, minecraft, screenExecutor, title, widthFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
Method Summary
Modifier and TypeMethodDescriptionvoidadded()static @Nullable CategoryPopupA mod's config by name (the path's first part), then the category in it; null when either is missing.static CategoryPopupcreate(@Nullable net.minecraft.client.gui.screens.Screen parent, ConfigImpl config, String path) The category at a path in a config: a group's dotted (or slashed) path, a single setting's path, or empty for the whole config.static CategoryPopupcreate(@Nullable net.minecraft.client.gui.screens.Screen parent, ConfigImpl config, String path, @Nullable ConfigTheme theme) Ascreate(Screen, ConfigImpl, String), drawn withthemeinstead of the config's own.protected voidbooleankeyPressed(int keyCode, int scanCode, int modifiers) voidonClose()voidonConfigSynced(Config config) The server's values changed while the popup was open.Every category path of a mod's configs, ascreate(Screen, String, String)takes them.protected voidrenderPopup(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float a) Draws fixed content inside the panel, under the widgets.voidtick()protected ConfigIcons.IconAn icon before the title, if any.protected @Nullable net.minecraft.network.chat.ComponentMuted text at the right of the title, if any.Methods inherited from class net.ixdarklord.coolcatcore.internal.config.client.gui.style.StyledPopup
contentBottom, contentLeft, contentTop, contentWidth, footerButtonY, footerTop, init, isPauseScreen, mouseClicked, removed, render, renderBackground, repositionElements, resize, setPanelMethods inherited from class net.minecraft.client.gui.screens.Screen
addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, changeFocus, children, clearWidgets, findNarratableWidget, getBackgroundMusic, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, hideWidgets, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, narrationEnabled, onFilesDrop, rebuildWidgets, removeWidget, renderBackground, renderDirtBackground, renderWithTooltip, setInitialFocus, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, shouldNarrateNavigation, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, wrapScreenErrorMethods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocusedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
charTyped, getChildAt, getCurrentFocusPath, isFocused, keyReleased, magicalSpecialHackyFocus, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMovedMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Method Details
-
create
public static CategoryPopup create(@Nullable @Nullable net.minecraft.client.gui.screens.Screen parent, ConfigImpl config, String path) The category at a path in a config: a group's dotted (or slashed) path, a single setting's path, or empty for the whole config.- Throws:
IllegalArgumentException- when nothing is at the path
-
create
public static CategoryPopup create(@Nullable @Nullable net.minecraft.client.gui.screens.Screen parent, ConfigImpl config, String path, @Nullable @Nullable ConfigTheme theme) Ascreate(Screen, ConfigImpl, String), drawn withthemeinstead of the config's own. -
create
@Nullable public static @Nullable CategoryPopup create(@Nullable @Nullable net.minecraft.client.gui.screens.Screen parent, String modId, String path) A mod's config by name (the path's first part), then the category in it; null when either is missing. -
paths
Every category path of a mod's configs, ascreate(Screen, String, String)takes them. -
titleIcon
Description copied from class:StyledPopupAn icon before the title, if any.- Overrides:
titleIconin classStyledPopup
-
titleNote
@Nullable protected @Nullable net.minecraft.network.chat.Component titleNote()Description copied from class:StyledPopupMuted text at the right of the title, if any.- Overrides:
titleNotein classStyledPopup
-
initPopup
protected void initPopup()- Specified by:
initPopupin classStyledPopup
-
renderPopup
protected void renderPopup(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float a) Description copied from class:StyledPopupDraws fixed content inside the panel, under the widgets.- Overrides:
renderPopupin classStyledPopup
-
tick
public void tick()- Overrides:
tickin classnet.minecraft.client.gui.screens.Screen
-
keyPressed
public boolean keyPressed(int keyCode, int scanCode, int modifiers) - Specified by:
keyPressedin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Specified by:
keyPressedin interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
keyPressedin classnet.minecraft.client.gui.screens.Screen
-
onClose
public void onClose()- Overrides:
onClosein classStyledPopup
-
onConfigSynced
The server's values changed while the popup was open. -
added
public void added()- Overrides:
addedin classStyledPopup
-