Class AbstractMultiPanelWidget
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.ixdarklord.coolcatcanvas.api.client.gui.components.widgets.AbstractDraggableWidget
net.ixdarklord.coolcatcanvas.api.client.gui.components.widgets.AbstractMultiPanelWidget
- All Implemented Interfaces:
MovableElement, 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, net.minecraft.client.gui.narration.NarratableEntry, net.minecraft.client.gui.narration.NarrationSupplier
A (optionally draggable) window whose content area shows a stack of
Panels.
- Panels are drawn bottom to top in the order they were added; hidden panels are skipped.
- Input goes to the window's own widgets (title bar buttons...) first, then to the panels from the top down.
A visible modal panel stops input from reaching the panels below it,
and those panels are dimmed with
the overlay color. - The panel that accepted a mouse press receives the following drag and release events.
- Only the topmost visible panel receives keyboard input.
getPanelRectangle(Panel) (the layout rectangle by default) whenever the window
moves or is resized with setBounds(int, int, int, int).-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry
net.minecraft.client.gui.narration.NarratableEntry.NarrationPriority -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractMultiPanelWidget(net.minecraft.network.chat.Component title, int x, int y, int width, int height, boolean isMovable) -
Method Summary
Modifier and TypeMethodDescriptionprotected <P extends Panel>
PaddPanel(P panel) booleancharTyped(net.minecraft.client.input.CharacterEvent event) protected List<net.minecraft.network.chat.Component> protected net.minecraft.client.gui.navigation.ScreenRectanglegetPanelRectangle(Panel panel) Where a panel is placed; the layout rectangle unless overridden.@Nullable PanelThe topmost visible panel, if any.protected booleanisCaptured(Panel panel) Whether the given panel is currently receiving a mouse drag.protected booleanisMouseOverOwnWidget(double mouseX, double mouseY) Whether the cursor is over one of the window's own widgets, which sit on top of the panels.booleankeyPressed(net.minecraft.client.input.KeyEvent event) booleankeyReleased(net.minecraft.client.input.KeyEvent event) booleanmouseClicked(net.minecraft.client.input.MouseButtonEvent event, boolean doubleClick) booleanmouseDragged(net.minecraft.client.input.MouseButtonEvent event, double dragX, double dragY) voidmouseMoved(double mouseX, double mouseY) booleanmouseReleased(net.minecraft.client.input.MouseButtonEvent event) booleanmouseScrolled(double mouseX, double mouseY, double scrollX, double scrollY) protected voidremovePanel(Panel panel) protected voidrenderContents(net.minecraft.client.gui.GuiGraphicsExtractor graphics, float partialTick, int mouseX, int mouseY) voidsetBounds(int x, int y, int width, int height) Moves and resizes the window.voidsetOverlayColor(int argb) Color drawn over the panels below a visible modal panel.protected voidMethods inherited from class AbstractDraggableWidget
addRenderableOnly, addRenderableWidget, addWidget, applyIfVisible, changeFocus, children, clearFocus, clearWidgets, extractRenderState, getButtons, getDraggingAreaColor, getDraggingRectangle, getElements, getHeight, getRectangle, getTitle, getWidth, getX, getY, init, isDebug, isInitialized, isMouseOver, isMouseOverDraggingRectangle, isMouseOverLayoutRectangle, isVisible, layoutRectangle, moveTo, narrationPriority, playDownSound, postInit, rebuildWidgets, removeWidget, renderBackground, renderDebugInfo, renderDraggingBoxHighlight, renderLabels, setInitialFocus, setInitialFocus, setVisible, setX, setY, toggleVisibility, toggleVisibility, updateNarrationMethods 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
getBorderForArrowNavigation, getChildAt, getCurrentFocusPath, isFocused, nextFocusPath, preeditUpdated, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
capturesInput, shouldTakeFocusAfterInteractionMethods inherited from interface MovableElement
moveTo, stepMethods inherited from interface net.minecraft.client.gui.narration.NarratableEntry
getNarratables, isActiveMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Constructor Details
-
AbstractMultiPanelWidget
public AbstractMultiPanelWidget(net.minecraft.network.chat.Component title, int x, int y, int width, int height, boolean isMovable)
-
-
Method Details
-
addPanel
-
removePanel
-
getPanels
-
getTopPanel
The topmost visible panel, if any. -
getPanelRectangle
Where a panel is placed; the layout rectangle unless overridden. -
setOverlayColor
public void setOverlayColor(int argb) Color drawn over the panels below a visible modal panel. -
setBounds
public void setBounds(int x, int y, int width, int height) Moves and resizes the window. -
updateChildren
protected void updateChildren()- Overrides:
updateChildrenin classAbstractDraggableWidget
-
isMouseOverOwnWidget
protected boolean isMouseOverOwnWidget(double mouseX, double mouseY) Whether the cursor is over one of the window's own widgets, which sit on top of the panels. -
renderContents
protected void renderContents(net.minecraft.client.gui.GuiGraphicsExtractor graphics, float partialTick, int mouseX, int mouseY) - Overrides:
renderContentsin classAbstractDraggableWidget
-
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- Overrides:
mouseClickedin classAbstractDraggableWidget
-
mouseReleased
public boolean mouseReleased(net.minecraft.client.input.MouseButtonEvent event) - Specified by:
mouseReleasedin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Specified by:
mouseReleasedin interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
mouseReleasedin classAbstractDraggableWidget
-
mouseDragged
public boolean mouseDragged(net.minecraft.client.input.MouseButtonEvent event, double dragX, double dragY) - Specified by:
mouseDraggedin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Specified by:
mouseDraggedin interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
mouseDraggedin classAbstractDraggableWidget
-
mouseScrolled
public boolean mouseScrolled(double mouseX, double mouseY, double scrollX, double scrollY) - Specified by:
mouseScrolledin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Specified by:
mouseScrolledin interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
mouseScrolledin classAbstractDraggableWidget
-
mouseMoved
public void mouseMoved(double mouseX, double mouseY) -
keyPressed
public boolean keyPressed(net.minecraft.client.input.KeyEvent event) - Specified by:
keyPressedin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Specified by:
keyPressedin interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
keyPressedin classAbstractDraggableWidget
-
keyReleased
public boolean keyReleased(net.minecraft.client.input.KeyEvent event) -
charTyped
public boolean charTyped(net.minecraft.client.input.CharacterEvent event) - Specified by:
charTypedin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Specified by:
charTypedin interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
charTypedin classAbstractDraggableWidget
-
isCaptured
Whether the given panel is currently receiving a mouse drag. -
getDebugInfo
- Overrides:
getDebugInfoin classAbstractDraggableWidget
-