Class WidgetKeybindCheckBox
java.lang.Object
net.minecraft.client.gui.GuiComponent
net.minecraft.client.gui.components.AbstractWidget
me.desht.pneumaticcraft.client.gui.widget.WidgetCheckBox
me.desht.pneumaticcraft.client.gui.widget.WidgetKeybindCheckBox
- All Implemented Interfaces:
ICheckboxWidget,ITaggedWidget,ITooltipProvider,net.minecraft.client.gui.components.events.GuiEventListener,net.minecraft.client.gui.components.Widget,net.minecraft.client.gui.narration.NarratableEntry,net.minecraft.client.gui.narration.NarrationSupplier
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry
net.minecraft.client.gui.narration.NarratableEntry.NarrationPriority -
Field Summary
Fields inherited from class me.desht.pneumaticcraft.client.gui.widget.WidgetCheckBox
checkedFields inherited from class net.minecraft.client.gui.components.AbstractWidget
active, alpha, height, isHovered, packedFGColor, UNSET_FG_COLOR, visible, WIDGETS_LOCATION, width, x, yFields inherited from class net.minecraft.client.gui.GuiComponent
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATIONFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTooltip(double mouseX, double mouseY, List<net.minecraft.network.chat.Component> curTooltip, boolean shiftPressed) static WidgetKeybindCheckBoxforUpgrade(IArmorUpgradeClientHandler<?> handler) static WidgetKeybindCheckBoxforUpgrade(IArmorUpgradeHandler<?> handler) static WidgetKeybindCheckBoxget(net.minecraft.resources.ResourceLocation upgradeID) static WidgetKeybindCheckBoxstatic WidgetKeybindCheckBoxgetOrCreate(net.minecraft.resources.ResourceLocation upgradeID, int x, int y, int color, Consumer<ICheckboxWidget> pressable) net.minecraft.resources.ResourceLocationGet the upgrade ID for this checkbox; the upgrade that is toggled when the checkbox is clicked.static booleanisHandlerEnabled(IArmorUpgradeHandler<?> handler) booleankeyPressed(int keyCode, int scanCode, int modifiers) booleanmouseClicked(double x, double y, int button) withOwnerUpgradeID(net.minecraft.resources.ResourceLocation ownerUpgradeID) Set the upgrade ID of the owning upgrade.Methods inherited from class me.desht.pneumaticcraft.client.gui.widget.WidgetCheckBox
getTag, getTooltip, isChecked, onClick, renderButton, setChecked, setTooltip, setTooltipKey, updateNarration, withTagMethods inherited from class net.minecraft.client.gui.components.AbstractWidget
changeFocus, clearFGColor, clicked, createNarrationMessage, defaultButtonNarrationText, getFGColor, getHeight, getMessage, getWidth, getYImage, isActive, isFocused, isHoveredOrFocused, isMouseOver, isValidClickButton, mouseDragged, mouseReleased, narrationPriority, onDrag, onFocusedChanged, onRelease, playDownSound, render, renderBg, renderToolTip, setAlpha, setFGColor, setFocused, setHeight, setMessage, setWidth, wrapDefaultNarrationMessageMethods inherited from class net.minecraft.client.gui.GuiComponent
blit, blit, blit, blit, blit, blitOutlineBlack, disableScissor, drawCenteredString, drawCenteredString, drawCenteredString, drawString, drawString, drawString, enableScissor, fill, fillGradient, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, vLineMethods 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.GuiEventListener
charTyped, keyReleased, mouseMoved, mouseScrolledMethods inherited from interface me.desht.pneumaticcraft.api.client.pneumatic_helmet.ICheckboxWidget
asWidgetMethods inherited from interface me.desht.pneumaticcraft.client.gui.widget.ITooltipProvider
shouldProvide
-
Method Details
-
getOrCreate
public static WidgetKeybindCheckBox getOrCreate(net.minecraft.resources.ResourceLocation upgradeID, int x, int y, int color, Consumer<ICheckboxWidget> pressable) -
get
-
forUpgrade
-
forUpgrade
-
getCoreComponents
-
withOwnerUpgradeID
Description copied from interface:ICheckboxWidgetSet the upgrade ID of the owning upgrade. Use this for sub-controls, e.g. the builder mode setting on jet boots.- Specified by:
withOwnerUpgradeIDin interfaceICheckboxWidget- Parameters:
ownerUpgradeID- the upgrade ID of the owning upgrade- Returns:
- this widget, for fluency
-
isHandlerEnabled
-
mouseClicked
public boolean mouseClicked(double x, double y, int button) - Specified by:
mouseClickedin interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
mouseClickedin classnet.minecraft.client.gui.components.AbstractWidget
-
keyPressed
public boolean keyPressed(int keyCode, int scanCode, int modifiers) - Specified by:
keyPressedin interfacenet.minecraft.client.gui.components.events.GuiEventListener
-
addTooltip
public void addTooltip(double mouseX, double mouseY, List<net.minecraft.network.chat.Component> curTooltip, boolean shiftPressed) - Specified by:
addTooltipin interfaceITooltipProvider- Overrides:
addTooltipin classWidgetCheckBox
-
getUpgradeId
public net.minecraft.resources.ResourceLocation getUpgradeId()Description copied from interface:ICheckboxWidgetGet the upgrade ID for this checkbox; the upgrade that is toggled when the checkbox is clicked.- Specified by:
getUpgradeIdin interfaceICheckboxWidget- Returns:
- the upgrade ID
-