Class StyledScreen

java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.ixdarklord.coolcatcanvas.internal.client.gui.style.StyledScreen
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:
ConfigScreen, ConfigSelectScreen, CutsceneEditorScreen, ListEditScreen, ScreenEffectsScreen, StartupMismatchScreen

public abstract class StyledScreen extends net.minecraft.client.gui.screens.Screen
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected static interface 
    Draws an icon in a square; returns whether there was one.

    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
     
    protected static final int
     
    protected static final int
     
    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
    StyledScreen(net.minecraft.network.chat.Component title, ConfigTheme theme)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    protected FlatButton
    The sun/moon button switching every config screen between dark and light, at the given spot in the top bar.
    protected int
    barWidgetY(int barY)
    The y of a 20-pixel widget centered in a bar.
    protected int
     
    protected int
     
    protected int
     
    void
    extractBackground(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a)
     
    protected void
    extractPanels(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a)
    Draws the bars, panels and fixed text under the widgets.
    void
    extractRenderState(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a)
     
    protected int
    extractTitle(net.minecraft.client.gui.GuiGraphicsExtractor graphics, net.minecraft.network.chat.Component title, int maxWidth)
    The title in the top bar, with an accent mark before it; returns where the text ends.
    protected int
    extractTitle(net.minecraft.client.gui.GuiGraphicsExtractor graphics, net.minecraft.network.chat.Component title, int maxWidth, @Nullable StyledScreen.TitleIcon icon)
    The title with an icon at the far left of the bar, before the accent mark.
    protected int
     
    protected int
     
    protected @Nullable net.minecraft.client.gui.screens.Screen
    The screen this one returns to, for choosing which way it slides in.
    void
     
     
    protected int
    The top bar's height; a screen with a larger header makes it taller.
    protected int
    topBarWidgetY(int widgetHeight)
    The y of a widget of this height centered in the top bar.
    protected int
     

    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, init, insertText, isAllowedInPortal, isInGameUi, isMouseOver, isPauseScreen, isValidCharacterForName, keyPressed, onClose, onFilesDrop, rebuildWidgets, removeWidget, repositionElements, resize, 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, mouseClicked, 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

  • Constructor Details

    • StyledScreen

      protected StyledScreen(net.minecraft.network.chat.Component title, ConfigTheme theme)
  • Method Details

    • theme

      public ConfigTheme theme()
    • topBarY

      protected int topBarY()
    • topBarHeight

      protected int topBarHeight()
      The top bar's height; a screen with a larger header makes it taller.
    • bodyTop

      protected int bodyTop()
    • bottomBarY

      protected int bottomBarY()
    • bodyBottom

      protected int bodyBottom()
    • frameLeft

      protected int frameLeft()
    • frameWidth

      protected int frameWidth()
    • barWidgetY

      protected int barWidgetY(int barY)
      The y of a 20-pixel widget centered in a bar.
    • topBarWidgetY

      protected int topBarWidgetY(int widgetHeight)
      The y of a widget of this height centered in the top bar.
    • parentScreen

      @Nullable protected @Nullable net.minecraft.client.gui.screens.Screen parentScreen()
      The screen this one returns to, for choosing which way it slides in.
    • 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
    • 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
    • extractPanels

      protected void extractPanels(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a)
      Draws the bars, panels and fixed text under the widgets.
    • addModeToggle

      protected FlatButton addModeToggle(int x)
      The sun/moon button switching every config screen between dark and light, at the given spot in the top bar.
    • extractTitle

      protected int extractTitle(net.minecraft.client.gui.GuiGraphicsExtractor graphics, net.minecraft.network.chat.Component title, int maxWidth)
      The title in the top bar, with an accent mark before it; returns where the text ends.
    • extractTitle

      protected int extractTitle(net.minecraft.client.gui.GuiGraphicsExtractor graphics, net.minecraft.network.chat.Component title, int maxWidth, @Nullable @Nullable StyledScreen.TitleIcon icon)
      The title with an icon at the far left of the bar, before the accent mark.