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:
CutsceneEditorScreen, ScreenEffectsScreen, StyledConfigScreen
public abstract class StyledScreen
extends net.minecraft.client.gui.screens.Screen
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interfaceDraws 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
FieldsModifier and TypeFieldDescriptionprotected static final intprotected static final intprotected static final intprotected final ConfigThemeprotected static final intFields 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
ConstructorsModifierConstructorDescriptionprotectedStyledScreen(net.minecraft.network.chat.Component title, ConfigTheme theme) -
Method Summary
Modifier and TypeMethodDescriptionvoidadded()protected FlatButtonaddModeToggle(int x) The sun/moon button switching every config screen between dark and light, at the given spot in the top bar.protected intbarWidgetY(int barY) The y of a 20-pixel widget centered in a bar.protected intprotected intbodyTop()protected intvoidextractBackground(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a) protected voidextractPanels(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a) Draws the bars, panels and fixed text under the widgets.voidextractRenderState(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a) protected intextractTitle(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 intextractTitle(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 intprotected intprotected @Nullable net.minecraft.client.gui.screens.ScreenThe screen this one returns to, for choosing which way it slides in.voidremoved()theme()protected intThe top bar's height; a screen with a larger header makes it taller.protected inttopBarWidgetY(int widgetHeight) The y of a widget of this height centered in the top bar.protected inttopBarY()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, panoramaShouldSpin, rebuildWidgets, removeWidget, repositionElements, resize, setInitialFocus, setInitialFocus, shouldCloseOnEsc, shouldNarrateNavigation, showsActiveEffects, tick, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, updateNarratorStatusMethods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocusedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
charTyped, getBorderForArrowNavigation, getChildAt, getCurrentFocusPath, isFocused, keyReleased, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, preeditUpdated, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMoved, shouldTakeFocusAfterInteractionMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Field Details
-
MARGIN
protected static final int MARGIN- See Also:
-
BAR_HEIGHT
protected static final int BAR_HEIGHT- See Also:
-
GAP
protected static final int GAP- See Also:
-
TITLE_ICON
protected static final int TITLE_ICON- See Also:
-
theme
-
-
Constructor Details
-
StyledScreen
-
-
Method Details
-
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:
addedin classnet.minecraft.client.gui.screens.Screen
-
removed
public void removed()- Overrides:
removedin classnet.minecraft.client.gui.screens.Screen
-
extractBackground
public void extractBackground(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a) - Overrides:
extractBackgroundin classnet.minecraft.client.gui.screens.Screen
-
extractRenderState
public void extractRenderState(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a) - Specified by:
extractRenderStatein interfacenet.minecraft.client.gui.components.Renderable- Overrides:
extractRenderStatein classnet.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
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.
-