Class ContextMenu
java.lang.Object
net.minecraft.client.gui.components.AbstractWidget
com.pixelmonmod.pixelmon.client.gui.widgets.ContextMenu
- All Implemented Interfaces:
net.minecraft.client.gui.components.events.GuiEventListener
,net.minecraft.client.gui.components.Renderable
,net.minecraft.client.gui.components.TabOrderedElement
,net.minecraft.client.gui.layouts.LayoutElement
,net.minecraft.client.gui.narration.NarratableEntry
,net.minecraft.client.gui.narration.NarrationSupplier
public class ContextMenu
extends net.minecraft.client.gui.components.AbstractWidget
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry
net.minecraft.client.gui.narration.NarratableEntry.NarrationPriority
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
Fields inherited from class net.minecraft.client.gui.components.AbstractWidget
active, alpha, focused, height, hoverOrFocusedStartTime, isHovered, message, MIN_SCROLL_PERIOD, packedFGColor, PERIOD_PER_SCROLLED_PIXEL, tabOrderGroup, tooltip, tooltipMsDelay, UNSET_FG_COLOR, visible, wasHoveredOrFocused, width, x, y
Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
mouseClicked
(double par1, double par2, int par3) void
moveTo
(int x, int y) void
renderWidget
(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float partialTicks) protected void
updateWidgetNarration
(net.minecraft.client.gui.narration.NarrationElementOutput p_259858_) Methods inherited from class net.minecraft.client.gui.components.AbstractWidget
clearFGColor, clicked, createNarrationMessage, createTooltipPositioner, defaultButtonNarrationText, getFGColor, getHeight, getMessage, getRectangle, getTabOrderGroup, getTooltip, getWidth, getX, getY, isActive, isFocused, isHovered, isHoveredOrFocused, isMouseOver, isValidClickButton, mouseDragged, mouseReleased, narrationPriority, nextFocusPath, onClick, onDrag, onRelease, playDownSound, render, renderScrollingString, renderScrollingString, renderScrollingString, setAlpha, setFGColor, setFocused, setHeight, setMessage, setTabOrderGroup, setTooltip, setTooltipDelay, setWidth, setX, setY, updateNarration, visitWidgets, wrapDefaultNarrationMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
charTyped, getCurrentFocusPath, keyPressed, keyReleased, mouseMoved, mouseScrolled
Methods inherited from interface net.minecraft.client.gui.layouts.LayoutElement
setPosition
-
Field Details
-
MENU_WIDTH
public static final int MENU_WIDTH- See Also:
-
BUTTON_SLOT_HEIGHT
public static final int BUTTON_SLOT_HEIGHT- See Also:
-
BUTTON_HEIGHT
public static final int BUTTON_HEIGHT- See Also:
-
BUTTON_WIDTH
public static final int BUTTON_WIDTH- See Also:
-
-
Constructor Details
-
ContextMenu
public ContextMenu(int x, int y, net.minecraft.network.chat.Component message)
-
-
Method Details
-
addButton
public ContextMenu addButton(String title, net.minecraft.client.gui.components.Button.OnPress action) -
addButton
public ContextMenu addButton(String title, net.minecraft.client.gui.components.Button.OnPress action, Color textColor) -
moveTo
public void moveTo(int x, int y) -
mouseClicked
public boolean mouseClicked(double par1, double par2, int par3) - Specified by:
mouseClicked
in interfacenet.minecraft.client.gui.components.events.GuiEventListener
- Overrides:
mouseClicked
in classnet.minecraft.client.gui.components.AbstractWidget
-
updateWidgetNarration
protected void updateWidgetNarration(net.minecraft.client.gui.narration.NarrationElementOutput p_259858_) - Specified by:
updateWidgetNarration
in classnet.minecraft.client.gui.components.AbstractWidget
-
renderWidget
public void renderWidget(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float partialTicks) - Specified by:
renderWidget
in classnet.minecraft.client.gui.components.AbstractWidget
-