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
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
FADE_IN_TIME, font, FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, minecraft, narratorButton, screenExecutor, title, width -
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 intvoidextractBackground(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a) protected voidextractPopup(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a) Draws fixed content inside the panel, under the widgets.voidextractRenderState(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a) protected 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(net.minecraft.client.input.MouseButtonEvent event, boolean doubleClick) voidonClose()@Nullable net.minecraft.client.gui.screens.Screenvoidremoved()protected voidvoidresize(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, 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, rebuildWidgets, removeWidget, 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, 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
-
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(int width, int height) - Overrides:
resizein classnet.minecraft.client.gui.screens.Screen
-
added
public void added()- Overrides:
addedin classnet.minecraft.client.gui.screens.Screen
-
overlayParent
@Nullable public @Nullable net.minecraft.client.gui.screens.Screen overlayParent() -
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
-
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:
mouseClickedin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Specified by:
mouseClickedin interfacenet.minecraft.client.gui.components.events.GuiEventListener
-
isPauseScreen
public boolean isPauseScreen()- Overrides:
isPauseScreenin classnet.minecraft.client.gui.screens.Screen
-
onClose
public void onClose()- Overrides:
onClosein classnet.minecraft.client.gui.screens.Screen
-