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
Fields inherited from class net.ixdarklord.coolcatcanvas.api.client.gui.components.widgets.AbstractDraggableWidget
blitOffset, font, height, layout, minecraft, movable, tickCount, title, visible, width, x, yFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
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(char codePoint, int modifiers) 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(int keyCode, int scanCode, int modifiers) booleankeyReleased(int keyCode, int scanCode, int modifiers) booleanmouseClicked(double mouseX, double mouseY, int button) booleanmouseDragged(double mouseX, double mouseY, int button, double dragX, double dragY) voidmouseMoved(double mouseX, double mouseY) booleanmouseReleased(double mouseX, double mouseY, int button) booleanmouseScrolled(double mouseX, double mouseY, double scrollX, double scrollY) protected voidremovePanel(Panel panel) protected voidrenderContents(net.minecraft.client.gui.GuiGraphics 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 net.ixdarklord.coolcatcanvas.api.client.gui.components.widgets.AbstractDraggableWidget
addRenderableOnly, addRenderableWidget, addWidget, applyIfVisible, changeFocus, children, clearFocus, clearWidgets, getButtons, getDraggingAreaColor, getDraggingRectangle, getElements, getHeight, getRectangle, getTitle, getWidth, getX, getY, init, isDebug, isInitialized, isMouseOver, isMouseOverDraggingRectangle, isMouseOverLayoutRectangle, isVisible, layoutRectangle, moveTo, narrationPriority, playDownSound, postInit, rebuildWidgets, removeWidget, render, 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
getChildAt, getCurrentFocusPath, isFocused, nextFocusPath, setFocusedMethods inherited from interface net.ixdarklord.coolcatcanvas.api.client.gui.components.widgets.MovableElement
moveTo, stepMethods inherited from interface net.minecraft.client.gui.narration.NarratableEntry
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.GuiGraphics graphics, float partialTick, int mouseX, int mouseY) - Overrides:
renderContentsin classAbstractDraggableWidget
-
mouseClicked
public boolean mouseClicked(double mouseX, double mouseY, int button) - 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(double mouseX, double mouseY, int button) - 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(double mouseX, double mouseY, int button, 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(int keyCode, int scanCode, int modifiers) - 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(int keyCode, int scanCode, int modifiers) -
charTyped
public boolean charTyped(char codePoint, int modifiers) - 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
-