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

public final class CategoryPopup extends StyledPopup
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_HEIGHT

    Fields inherited from class net.minecraft.client.gui.screens.Screen

    BACKGROUND_LOCATION, font, height, minecraft, screenExecutor, title, width

    Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener

    DOUBLE_CLICK_THRESHOLD_MS
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    static @Nullable CategoryPopup
    create(@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.
    create(@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.
    create(@Nullable net.minecraft.client.gui.screens.Screen parent, ConfigImpl config, String path, @Nullable ConfigTheme theme)
    As create(Screen, ConfigImpl, String), drawn with theme instead of the config's own.
    protected void
     
    boolean
    keyPressed(int keyCode, int scanCode, int modifiers)
     
    void
     
    void
    The server's values changed while the popup was open.
    static List<String>
    paths(String modId)
    Every category path of a mod's configs, as create(Screen, String, String) takes them.
    protected void
    renderPopup(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float a)
    Draws fixed content inside the panel, under the widgets.
    void
     
    An icon before the title, if any.
    protected @Nullable net.minecraft.network.chat.Component
    Muted 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, setPanel

    Methods 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, wrapScreenError

    Methods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler

    getFocused, isDragging, setDragging, setFocused

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler

    charTyped, getChildAt, getCurrentFocusPath, isFocused, keyReleased, magicalSpecialHackyFocus, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, setFocused

    Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener

    mouseMoved

    Methods 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)
      As create(Screen, ConfigImpl, String), drawn with theme instead 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

      public static List<String> paths(String modId)
      Every category path of a mod's configs, as create(Screen, String, String) takes them.
    • titleIcon

      protected ConfigIcons.Icon titleIcon()
      Description copied from class: StyledPopup
      An icon before the title, if any.
      Overrides:
      titleIcon in class StyledPopup
    • titleNote

      @Nullable protected @Nullable net.minecraft.network.chat.Component titleNote()
      Description copied from class: StyledPopup
      Muted text at the right of the title, if any.
      Overrides:
      titleNote in class StyledPopup
    • initPopup

      protected void initPopup()
      Specified by:
      initPopup in class StyledPopup
    • renderPopup

      protected void renderPopup(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float a)
      Description copied from class: StyledPopup
      Draws fixed content inside the panel, under the widgets.
      Overrides:
      renderPopup in class StyledPopup
    • tick

      public void tick()
      Overrides:
      tick in class net.minecraft.client.gui.screens.Screen
    • keyPressed

      public boolean keyPressed(int keyCode, int scanCode, int modifiers)
      Specified by:
      keyPressed in interface net.minecraft.client.gui.components.events.ContainerEventHandler
      Specified by:
      keyPressed in interface net.minecraft.client.gui.components.events.GuiEventListener
      Overrides:
      keyPressed in class net.minecraft.client.gui.screens.Screen
    • onClose

      public void onClose()
      Overrides:
      onClose in class StyledPopup
    • onConfigSynced

      public void onConfigSynced(Config config)
      The server's values changed while the popup was open.
    • added

      public void added()
      Overrides:
      added in class StyledPopup