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

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.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 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
    extractPopup(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a)
    Draws fixed content inside the panel, under the widgets.
    protected void
     
    boolean
    keyPressed(net.minecraft.client.input.KeyEvent event)
     
    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.
    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.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, updateNarratorStatus

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

    getFocused, isDragging, setDragging, setFocused

    Methods inherited from class Object

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

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

    charTyped, getBorderForArrowNavigation, getChildAt, getCurrentFocusPath, isFocused, keyReleased, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, preeditUpdated, setFocused

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

    mouseMoved, shouldTakeFocusAfterInteraction

    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
    • extractPopup

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

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

      public boolean keyPressed(net.minecraft.client.input.KeyEvent event)
      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