Class WidgetKeybindCheckBox
java.lang.Object
net.minecraft.client.gui.components.AbstractWidget
me.desht.pneumaticcraft.client.gui.widget.PNCWidget<WidgetCheckBox>
me.desht.pneumaticcraft.client.gui.widget.WidgetCheckBox
me.desht.pneumaticcraft.client.gui.widget.WidgetKeybindCheckBox
- All Implemented Interfaces:
ICheckboxWidget,ITaggedWidget,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
-
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
ACCESSIBILITY_TEXTURE, active, alpha, height, isHovered, packedFGColor, UNSET_FG_COLOR, visible, WIDGETS_LOCATION, widthFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
Method Summary
Modifier and TypeMethodDescriptionstatic 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.booleanstatic booleanisHandlerEnabled(IArmorUpgradeHandler<?> handler) booleankeyPressed(int keyCode, int scanCode, int modifiers) booleanmouseClicked(double x, double y, int button) voidrenderWidget(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float partialTick) 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, isChecked, onClick, setChecked, updateWidgetNarration, withTagMethods inherited from class me.desht.pneumaticcraft.client.gui.widget.PNCWidget
setTooltipKey, setTooltipText, setTooltipTextMethods 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, onDrag, onRelease, playDownSound, render, renderScrollingString, renderScrollingString, renderTexture, setAlpha, setFGColor, setFocused, setHeight, setMessage, setTabOrderGroup, setTooltip, setTooltipDelay, setWidth, setX, setY, updateNarration, visitWidgets, wrapDefaultNarrationMessageMethods 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, getCurrentFocusPath, keyReleased, mouseMoved, mouseScrolledMethods inherited from interface me.desht.pneumaticcraft.api.client.pneumatic_helmet.ICheckboxWidget
asWidgetMethods inherited from interface net.minecraft.client.gui.layouts.LayoutElement
setPosition
-
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.- 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
-
handleClick
public boolean handleClick() -
keyPressed
public boolean keyPressed(int keyCode, int scanCode, int modifiers) -
renderWidget
public void renderWidget(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float partialTick) - Overrides:
renderWidgetin 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.- Returns:
- the upgrade ID
-