Class StyledPopup

java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.ixdarklord.coolcatcanvas.internal.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:
ColorPickerPopup, 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

    FADE_IN_TIME, font, FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, minecraft, narratorButton, screenExecutor, title, width
  • 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
     
    void
    extractBackground(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a)
     
    protected void
    extractPopup(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a)
    Draws fixed content inside the panel, under the widgets.
    void
    extractRenderState(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a)
     
    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(net.minecraft.client.input.MouseButtonEvent event, boolean doubleClick)
     
    void
     
    @Nullable net.minecraft.client.gui.screens.Screen
     
    void
     
    protected void
     
    void
    resize(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, 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, keyPressed, onFilesDrop, panoramaShouldSpin, rebuildWidgets, removeWidget, setInitialFocus, setInitialFocus, shouldCloseOnEsc, shouldNarrateNavigation, showsActiveEffects, tick, 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
  • 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(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
    • overlayParent

      @Nullable public @Nullable net.minecraft.client.gui.screens.Screen overlayParent()
    • removed

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

      public void extractBackground(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a)
      Overrides:
      extractBackground in class net.minecraft.client.gui.screens.Screen
    • extractRenderState

      public void extractRenderState(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a)
      Specified by:
      extractRenderState in interface net.minecraft.client.gui.components.Renderable
      Overrides:
      extractRenderState 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.
    • extractPopup

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

      public boolean mouseClicked(net.minecraft.client.input.MouseButtonEvent event, boolean doubleClick)
      Specified by:
      mouseClicked in interface net.minecraft.client.gui.components.events.ContainerEventHandler
      Specified by:
      mouseClicked in interface net.minecraft.client.gui.components.events.GuiEventListener
    • 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