Class StyledPopup
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
FieldsModifier and TypeFieldDescriptionprotected static final intThe 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 abovefooterTop().protected static final intprotected intprotected intprotected intprotected intprotected final @Nullable net.minecraft.client.gui.screens.Screenprotected 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
ConstructorsModifierConstructorDescriptionprotectedStyledPopup(@Nullable net.minecraft.client.gui.screens.Screen parent, net.minecraft.network.chat.Component title, ConfigTheme theme) -
Method Summary
Modifier and TypeMethodDescriptionvoidadded()protected intprotected intWhere content starts, under the title.protected intprotected intprotected intWhere the footer's 20px tall buttons go.protected intThe top of the footer strip; the body ends here.protected final voidinit()protected abstract voidbooleanbooleanmouseClicked(double mouseX, double mouseY, int button) voidonClose()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 screen underneath (dimmed), or the theme's background, then the panel with its title and fixed content.protected voidrenderPopup(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float a) Draws fixed content inside the panel, under the widgets.protected voidvoidresize(net.minecraft.client.Minecraft minecraft, int width, int height) protected voidsetPanel(int width, int height) Sizes and centers the panel.protected @Nullable ConfigIcons.IconAn icon before the title, if any.protected @Nullable net.minecraft.network.chat.ComponentMuted 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, 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, 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
-
PADDING
protected static final int PADDING- See Also:
-
TITLE_HEIGHT
protected static final int TITLE_HEIGHT- See Also:
-
FOOTER
protected static final int FOOTERThe 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 abovefooterTop().- See Also:
-
parent
@Nullable protected final @Nullable net.minecraft.client.gui.screens.Screen parent -
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() -
init
protected final void init()- Overrides:
initin classnet.minecraft.client.gui.screens.Screen
-
initPopup
protected abstract void initPopup() -
repositionElements
protected void repositionElements()- Overrides:
repositionElementsin classnet.minecraft.client.gui.screens.Screen
-
resize
public void resize(net.minecraft.client.Minecraft minecraft, int width, int height) - Overrides:
resizein classnet.minecraft.client.gui.screens.Screen
-
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 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:
renderin interfacenet.minecraft.client.gui.components.Renderable- Overrides:
renderin classnet.minecraft.client.gui.screens.Screen
-
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:
isPauseScreenin classnet.minecraft.client.gui.screens.Screen
-
onClose
public void onClose()- Overrides:
onClosein classnet.minecraft.client.gui.screens.Screen
-