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

public class WidgetKeybindCheckBox extends WidgetCheckBox implements ITooltipProvider
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     

    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 me.desht.pneumaticcraft.client.gui.widget.WidgetCheckBox

    checked

    Fields inherited from class net.minecraft.client.gui.components.AbstractWidget

    active, alpha, height, isHovered, packedFGColor, UNSET_FG_COLOR, visible, WIDGETS_LOCATION, width, x, y

    Fields inherited from class net.minecraft.client.gui.GuiComponent

    BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION

    Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener

    DOUBLE_CLICK_THRESHOLD_MS
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addTooltip(double mouseX, double mouseY, List<net.minecraft.network.chat.Component> curTooltip, boolean shiftPressed)
     
     
     
    get(net.minecraft.resources.ResourceLocation upgradeID)
     
     
    getOrCreate(net.minecraft.resources.ResourceLocation upgradeID, int x, int y, int color, Consumer<ICheckboxWidget> pressable)
     
    net.minecraft.resources.ResourceLocation
    Get the upgrade ID for this checkbox; the upgrade that is toggled when the checkbox is clicked.
    static boolean
     
    boolean
    keyPressed(int keyCode, int scanCode, int modifiers)
     
    boolean
    mouseClicked(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, withTag

    Methods 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, wrapDefaultNarrationMessage

    Methods 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, vLine

    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, keyReleased, mouseMoved, mouseScrolled

    Methods inherited from interface me.desht.pneumaticcraft.api.client.pneumatic_helmet.ICheckboxWidget

    asWidget

    Methods 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

      public static WidgetKeybindCheckBox get(net.minecraft.resources.ResourceLocation upgradeID)
    • forUpgrade

      public static WidgetKeybindCheckBox forUpgrade(IArmorUpgradeHandler<?> handler)
    • forUpgrade

      public static WidgetKeybindCheckBox forUpgrade(IArmorUpgradeClientHandler<?> handler)
    • getCoreComponents

      public static WidgetKeybindCheckBox getCoreComponents()
    • withOwnerUpgradeID

      public ICheckboxWidget withOwnerUpgradeID(net.minecraft.resources.ResourceLocation ownerUpgradeID)
      Description copied from interface: ICheckboxWidget
      Set the upgrade ID of the owning upgrade. Use this for sub-controls, e.g. the builder mode setting on jet boots.
      Specified by:
      withOwnerUpgradeID in interface ICheckboxWidget
      Parameters:
      ownerUpgradeID - the upgrade ID of the owning upgrade
      Returns:
      this widget, for fluency
    • isHandlerEnabled

      public static boolean isHandlerEnabled(IArmorUpgradeHandler<?> handler)
    • mouseClicked

      public boolean mouseClicked(double x, double y, int button)
      Specified by:
      mouseClicked in interface net.minecraft.client.gui.components.events.GuiEventListener
      Overrides:
      mouseClicked in class net.minecraft.client.gui.components.AbstractWidget
    • keyPressed

      public boolean keyPressed(int keyCode, int scanCode, int modifiers)
      Specified by:
      keyPressed in interface net.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:
      addTooltip in interface ITooltipProvider
      Overrides:
      addTooltip in class WidgetCheckBox
    • getUpgradeId

      public net.minecraft.resources.ResourceLocation getUpgradeId()
      Description copied from interface: ICheckboxWidget
      Get the upgrade ID for this checkbox; the upgrade that is toggled when the checkbox is clicked.
      Specified by:
      getUpgradeId in interface ICheckboxWidget
      Returns:
      the upgrade ID