Class CategoryPopup
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.ixdarklord.coolcatcanvas.internal.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 StyledPopup
FOOTER, PADDING, panelHeight, panelWidth, panelX, panelY, parent, theme, TITLE_HEIGHTFields inherited from class net.minecraft.client.gui.screens.Screen
FADE_IN_TIME, font, FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, minecraft, narratorButton, screenExecutor, title, width -
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 voidextractPopup(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a) Draws fixed content inside the panel, under the widgets.protected voidbooleankeyPressed(net.minecraft.client.input.KeyEvent event) 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.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 StyledPopup
contentBottom, contentLeft, contentTop, contentWidth, extractBackground, extractRenderState, footerButtonY, footerTop, init, isPauseScreen, mouseClicked, overlayParent, removed, repositionElements, resize, setPanelMethods inherited from class net.minecraft.client.gui.screens.Screen
addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, canInterruptWithAnotherScreen, changeFocus, children, clearFocus, clearWidgets, clickCommandAction, clickUrlAction, defaultHandleClickEvent, defaultHandleGameClickEvent, extractBlurredBackground, extractMenuBackground, extractMenuBackground, extractMenuBackgroundTexture, extractPanorama, extractRenderStateWithTooltipAndSubtitles, extractTransparentBackground, fadeWidgets, fillCrashDetails, findNarratableWidget, getBackgroundMusic, getFont, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleDelayedNarration, init, insertText, isAllowedInPortal, isInGameUi, isMouseOver, isValidCharacterForName, onFilesDrop, panoramaShouldSpin, rebuildWidgets, removeWidget, setInitialFocus, setInitialFocus, shouldCloseOnEsc, shouldNarrateNavigation, showsActiveEffects, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, updateNarratorStatusMethods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocusedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
charTyped, getBorderForArrowNavigation, getChildAt, getCurrentFocusPath, isFocused, keyReleased, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, preeditUpdated, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMoved, shouldTakeFocusAfterInteractionMethods 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
-
extractPopup
protected void extractPopup(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a) Description copied from class:StyledPopupDraws fixed content inside the panel, under the widgets.- Overrides:
extractPopupin classStyledPopup
-
tick
public void tick()- Overrides:
tickin classnet.minecraft.client.gui.screens.Screen
-
keyPressed
public boolean keyPressed(net.minecraft.client.input.KeyEvent event) - 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
-