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
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
Direct Known Subclasses:
CategoryPopup, ColorPickerScreen, ConfirmPopup

public abstract class StyledPopup extends net.minecraft.client.gui.screens.Screen
  • 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
    Modifier and Type
    Field
    Description
    protected static final int
    The strip along the bottom of the content that holds a popup's buttons (and nothing else); a themed popup sprite draws its footer band behind it, so body content must stay above footerTop().
    protected static final int
     
    protected int
     
    protected int
     
    protected int
     
    protected int
     
    protected final @Nullable net.minecraft.client.gui.screens.Screen
     
    protected final ConfigTheme
     
    protected static final int
     

    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
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    StyledPopup(@Nullable net.minecraft.client.gui.screens.Screen parent, net.minecraft.network.chat.Component title, ConfigTheme theme)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    protected int
     
    protected int
    Where content starts, under the title.
    protected int
     
    protected int
     
    protected int
    Where the footer's 20px tall buttons go.
    protected int
    The top of the footer strip; the body ends here.
    protected final void
     
    protected abstract void
     
    boolean
     
    boolean
    mouseClicked(double mouseX, double mouseY, int button)
     
    void
     
    void
     
    void
    render(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float a)
     
    void
    renderBackground(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float a)
    The screen underneath (dimmed), or the theme's background, then the panel with its title and fixed content.
    protected void
    renderPopup(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float a)
    Draws fixed content inside the panel, under the widgets.
    protected void
     
    void
    resize(net.minecraft.client.Minecraft minecraft, int width, int height)
     
    protected void
    setPanel(int width, int height)
    Sizes and centers the panel.
    protected @Nullable ConfigIcons.Icon
    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, changeFocus, children, clearWidgets, findNarratableWidget, getBackgroundMusic, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, hideWidgets, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, keyPressed, narrationEnabled, onFilesDrop, rebuildWidgets, removeWidget, renderBackground, renderDirtBackground, renderWithTooltip, setInitialFocus, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, shouldNarrateNavigation, tick, 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
  • Field Details

    • PADDING

      protected static final int PADDING
      See Also:
    • TITLE_HEIGHT

      protected static final int TITLE_HEIGHT
      See Also:
    • parent

      @Nullable protected final @Nullable net.minecraft.client.gui.screens.Screen parent
    • theme

      protected final ConfigTheme theme
    • panelX

      protected int panelX
    • panelY

      protected int panelY
    • panelWidth

      protected int panelWidth
    • panelHeight

      protected int panelHeight
  • Constructor Details

    • StyledPopup

      protected StyledPopup(@Nullable @Nullable net.minecraft.client.gui.screens.Screen parent, net.minecraft.network.chat.Component title, ConfigTheme theme)
  • Method Details

    • setPanel

      protected void setPanel(int width, int height)
      Sizes and centers the panel.
    • contentLeft

      protected int contentLeft()
      Where content starts, under the title.
    • contentTop

      protected int contentTop()
    • contentWidth

      protected int contentWidth()
    • contentBottom

      protected int contentBottom()
    • footerTop

      protected int footerTop()
      The top of the footer strip; the body ends here.
    • footerButtonY

      protected int footerButtonY()
      Where the footer's 20px tall buttons go.
    • init

      protected final void init()
      Overrides:
      init in class net.minecraft.client.gui.screens.Screen
    • initPopup

      protected abstract void initPopup()
    • repositionElements

      protected void repositionElements()
      Overrides:
      repositionElements in class net.minecraft.client.gui.screens.Screen
    • resize

      public void resize(net.minecraft.client.Minecraft minecraft, int width, int height)
      Overrides:
      resize in class net.minecraft.client.gui.screens.Screen
    • added

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

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

      public void renderBackground(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float a)
      The screen underneath (dimmed), or the theme's background, then the panel with its title and fixed content.
    • render

      public void render(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float a)
      Specified by:
      render in interface net.minecraft.client.gui.components.Renderable
      Overrides:
      render in class net.minecraft.client.gui.screens.Screen
    • titleIcon

      protected @Nullable ConfigIcons.Icon titleIcon()
      An icon before the title, if any.
    • titleNote

      @Nullable protected @Nullable net.minecraft.network.chat.Component titleNote()
      Muted text at the right of the title, if any.
    • renderPopup

      protected void renderPopup(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float a)
      Draws fixed content inside the panel, under the widgets.
    • mouseClicked

      public boolean mouseClicked(double mouseX, double mouseY, int button)
    • isPauseScreen

      public boolean isPauseScreen()
      Overrides:
      isPauseScreen in class net.minecraft.client.gui.screens.Screen
    • onClose

      public void onClose()
      Overrides:
      onClose in class net.minecraft.client.gui.screens.Screen