Class CheckboxButton

java.lang.Object
net.minecraft.client.gui.GuiComponent
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.AbstractButton
net.minecraft.client.gui.components.Button
info.u_team.u_team_core.gui.elements.UButton
info.u_team.u_team_core.gui.elements.CheckboxButton
All Implemented Interfaces:
BackgroundColorProvider, PerspectiveRenderable, Scalable, ScaleProvider, TextProvider, TextSettingsProvider, WidgetRenderable, 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 CheckboxButton extends UButton
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.client.gui.components.Button

    net.minecraft.client.gui.components.Button.Builder, net.minecraft.client.gui.components.Button.CreateNarration, net.minecraft.client.gui.components.Button.OnPress

    Nested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry

    net.minecraft.client.gui.narration.NarratableEntry.NarrationPriority

    Nested classes/interfaces inherited from interface info.u_team.u_team_core.api.gui.TextSettingsProvider

    TextSettingsProvider.TextRenderType
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected boolean
     
    protected boolean
     
    protected boolean
     
    protected boolean
     
    protected static final net.minecraft.resources.ResourceLocation
     

    Fields inherited from class info.u_team.u_team_core.gui.elements.UButton

    buttonColor, buttonTextureProvider, DEFAULT_NARRATION, disabledTextColor, EMTPY_PRESSABLE, LIGHT_GRAY, scale, textColor, WHITE

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

    createNarration, DEFAULT_HEIGHT, DEFAULT_WIDTH, onPress, SMALL_WIDTH

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

    TEXT_MARGIN, TEXTURE_BORDER_X, TEXTURE_BORDER_Y, TEXTURE_HEIGHT, TEXTURE_WIDTH, TEXTURE_Y_OFFSET

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

    ACCESSIBILITY_TEXTURE, active, alpha, height, isHovered, visible, WIDGETS_LOCATION, width, x, y

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

    BACKGROUND_LOCATION, GUI_ICONS_LOCATION, LIGHT_DIRT_BACKGROUND, STATS_ICON_LOCATION

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

    DOUBLE_CLICK_THRESHOLD_MS
  • Constructor Summary

    Constructors
    Constructor
    Description
    CheckboxButton(int x, int y, int width, int height, net.minecraft.network.chat.Component text, boolean checked, boolean drawText)
     
    CheckboxButton(int x, int y, int width, int height, net.minecraft.network.chat.Component text, boolean checked, boolean drawText, net.minecraft.client.gui.components.Button.OnPress pessable)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    boolean
     
    boolean
     
    void
     
    void
    renderForeground(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick)
     
    void
    renderWidgetTexture(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick)
     
    void
    setChecked(boolean checked)
     
    void
    setDrawText(boolean drawText)
     
    void
    setLeftSideText(boolean leftSideText)
     
    void
     
    void
    updateWidgetNarration(net.minecraft.client.gui.narration.NarrationElementOutput output)
     

    Methods inherited from class net.minecraft.client.gui.components.Button

    builder, createNarrationMessage

    Methods inherited from class net.minecraft.client.gui.components.AbstractButton

    getTextureY, keyPressed, onClick, renderString

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

    clicked, createTooltipPositioner, defaultButtonNarrationText, getHeight, getMessage, getRectangle, getTabOrderGroup, getWidth, getX, getY, isActive, isFocused, isHovered, isHoveredOrFocused, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrationPriority, nextFocusPath, onDrag, onRelease, playDownSound, render, renderScrollingString, renderScrollingString, renderTexture, setAlpha, setFocused, setMessage, setTabOrderGroup, setTooltip, setTooltipDelay, setWidth, setX, setY, updateNarration, visitWidgets, wrapDefaultNarrationMessage

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

    blit, blit, blit, blit, blit, blit, blitNineSliced, blitNineSliced, blitNineSliced, blitOutlineBlack, blitRepeating, disableScissor, drawCenteredString, drawCenteredString, drawCenteredString, drawString, drawString, drawString, enableScissor, fill, fill, fillGradient, fillGradient, fillGradient, hLine, renderOutline, 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, getCurrentFocusPath, keyReleased, mouseMoved, mouseScrolled

    Methods inherited from interface net.minecraft.client.gui.layouts.LayoutElement

    setPosition

    Methods inherited from interface info.u_team.u_team_core.api.gui.PerspectiveRenderable

    render

    Methods inherited from interface info.u_team.u_team_core.api.gui.TextSettingsProvider

    getCurrentTextFont, getCurrentTextRenderType
  • Field Details

    • TEXTURE

      protected static final net.minecraft.resources.ResourceLocation TEXTURE
    • checked

      protected boolean checked
    • drawText

      protected boolean drawText
    • leftSideText

      protected boolean leftSideText
    • dropShadow

      protected boolean dropShadow
  • Constructor Details

    • CheckboxButton

      public CheckboxButton(int x, int y, int width, int height, net.minecraft.network.chat.Component text, boolean checked, boolean drawText)
    • CheckboxButton

      public CheckboxButton(int x, int y, int width, int height, net.minecraft.network.chat.Component text, boolean checked, boolean drawText, net.minecraft.client.gui.components.Button.OnPress pessable)
  • Method Details

    • isChecked

      public boolean isChecked()
    • setChecked

      public void setChecked(boolean checked)
    • isDrawText

      public boolean isDrawText()
    • setDrawText

      public void setDrawText(boolean drawText)
    • isLeftSideText

      public boolean isLeftSideText()
    • setLeftSideText

      public void setLeftSideText(boolean leftSideText)
    • toggle

      public void toggle()
    • onPress

      public void onPress()
      Overrides:
      onPress in class net.minecraft.client.gui.components.Button
    • renderWidgetTexture

      public void renderWidgetTexture(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick)
      Specified by:
      renderWidgetTexture in interface WidgetRenderable
      Overrides:
      renderWidgetTexture in class UButton
    • renderForeground

      public void renderForeground(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTick)
      Specified by:
      renderForeground in interface PerspectiveRenderable
      Overrides:
      renderForeground in class UButton
    • updateWidgetNarration

      public void updateWidgetNarration(net.minecraft.client.gui.narration.NarrationElementOutput output)
      Overrides:
      updateWidgetNarration in class net.minecraft.client.gui.components.Button