Class StyledScreen
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.ixdarklord.coolcatcore.internal.config.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,ListEditScreen,ScreenEffectsScreen,StartupMismatchScreen
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
BACKGROUND_LOCATION, font, height, minecraft, screenExecutor, title, widthFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
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 intprotected intprotected intprotected @Nullable net.minecraft.client.gui.screens.ScreenThe screen this one returns to, for choosing which way it slides in.voidremoved()voidrender(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float a) voidrenderBackground(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float a) The theme's background, then the page's panels.protected voidrenderPanels(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float a) Draws the bars, panels and fixed text under the widgets.protected voidrenderPanorama(net.minecraft.client.gui.GuiGraphics graphics, float a) Draws the title screen's panorama, behind the background outside a world.protected intrenderTitle(net.minecraft.client.gui.GuiGraphics 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 intrenderTitle(net.minecraft.client.gui.GuiGraphics 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.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, changeFocus, children, clearWidgets, findNarratableWidget, getBackgroundMusic, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, hideWidgets, init, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, keyPressed, narrationEnabled, onClose, onFilesDrop, rebuildWidgets, removeWidget, renderBackground, renderDirtBackground, renderWithTooltip, repositionElements, resize, setInitialFocus, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, shouldNarrateNavigation, tick, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, wrapScreenErrorMethods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocusedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
charTyped, getChildAt, getCurrentFocusPath, isFocused, keyReleased, magicalSpecialHackyFocus, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMovedMethods 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
-
renderBackground
public void renderBackground(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float a) The theme's background, then the page's panels. The page's transition moves the panels and the widgets together, so it's pushed after the background and popped after the widgets. -
render
public void render(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float a) - Specified by:
renderin interfacenet.minecraft.client.gui.components.Renderable- Overrides:
renderin classnet.minecraft.client.gui.screens.Screen
-
renderPanorama
protected void renderPanorama(net.minecraft.client.gui.GuiGraphics graphics, float a) Draws the title screen's panorama, behind the background outside a world. -
renderPanels
protected void renderPanels(net.minecraft.client.gui.GuiGraphics 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. -
renderTitle
protected int renderTitle(net.minecraft.client.gui.GuiGraphics 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. -
renderTitle
protected int renderTitle(net.minecraft.client.gui.GuiGraphics 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.
-