java.lang.Object
io.github.thecsdev.tcdcommons.api.client.gui.TElement
io.github.thecsdev.tcdcommons.api.client.gui.other.TBlankElement
io.github.thecsdev.betterstats.api.client.gui.stats.widget.CustomStatElement
All Implemented Interfaces:
io.github.thecsdev.tcdcommons.api.client.gui.TParentElement, io.github.thecsdev.tcdcommons.api.client.util.interfaces.ITooltipProvider, io.github.thecsdev.tcdcommons.api.util.interfaces.IEnableStateProvider

public class CustomStatElement extends io.github.thecsdev.tcdcommons.api.client.gui.other.TBlankElement
A TBlankElement that only renders Texts on the left and right side of the CustomStatElement.
Does not handle any user input or have a background color.
  • Nested Class Summary

    Nested classes/interfaces inherited from class io.github.thecsdev.tcdcommons.api.client.gui.TElement

    io.github.thecsdev.tcdcommons.api.client.gui.TElement.TElementEvent_ChildAR, io.github.thecsdev.tcdcommons.api.client.gui.TElement.TElementEvent_ContextMenu, io.github.thecsdev.tcdcommons.api.client.gui.TElement.TElementEvent_Moved, io.github.thecsdev.tcdcommons.api.client.gui.TElement.TElementEvent_ParentChanged, io.github.thecsdev.tcdcommons.api.client.gui.TElement.TElementEvent_Resized
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    protected @Nullable net.minecraft.text.Text
     
    protected @Nullable net.minecraft.text.Text
     

    Fields inherited from class io.github.thecsdev.tcdcommons.api.client.gui.TElement

    alpha, eChildAdded, eChildRemoved, eContextMenu, eMoved, eParentChanged, eResized, height, SP_ALL, SP_INVOKE_EVENT, SP_MOVE_CHILDREN, SP_RELATIVE, SP_UPDATE_TOPMOST, SS_ALL, SS_INVOKE_EVENT, SS_UPDATE_TOPMOST, tooltip, tooltipPositioner, width, x, y, zOffset

    Fields inherited from interface io.github.thecsdev.tcdcommons.api.client.gui.TParentElement

    MAX_CHILD_NESTING_DEPTH
  • Constructor Summary

    Constructors
    Constructor
    Description
    CustomStatElement(int x, int y, int width, SUGeneralStat generalStat)
     
    CustomStatElement(int x, int y, int width, @Nullable net.minecraft.text.Text left, @Nullable net.minecraft.text.Text right)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final @Nullable net.minecraft.text.Text
     
    final @Nullable net.minecraft.text.Text
     
    void
    render(io.github.thecsdev.tcdcommons.api.client.gui.util.TDrawContext pencil)
     
    void
    setLeftText(@Nullable net.minecraft.text.Text left)
     
    void
    setRightText(@Nullable net.minecraft.text.Text right)
     

    Methods inherited from class io.github.thecsdev.tcdcommons.api.client.gui.other.TBlankElement

    input, input, isFocusable, isHoverable

    Methods inherited from class io.github.thecsdev.tcdcommons.api.client.gui.TElement

    canBeAddedTo, createContextMenu, getAlpha, getChildren, getEnabled, getHeight, getItemRenderer, getParent, getParentTElement, getParentTScreen, getTextRenderer, getTooltip, getTooltipPositioner, getWidth, getX, getY, getZIndex, getZOffset, isDragging, isEnabled, isEnabledAndVisible, isFocused, isFocusedOrHovered, isHovered, isVisible, move, moveChildren, next, postRender, previous, setAlpha, setPosition, setPosition, setSize, setSize, setTooltip, setZOffset, tick, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface io.github.thecsdev.tcdcommons.api.client.gui.TParentElement

    addChild, addChild, clearChildren, findChild, findLastChild, findParent, findParentTElement, forEachChild, getEndX, getEndY, removeChild, removeChild
  • Field Details

    • HEIGHT

      public static final int HEIGHT
    • txtLeft

      @Nullable protected @Nullable net.minecraft.text.Text txtLeft
    • txtRight

      @Nullable protected @Nullable net.minecraft.text.Text txtRight
  • Constructor Details

    • CustomStatElement

      public CustomStatElement(int x, int y, int width, SUGeneralStat generalStat)
    • CustomStatElement

      public CustomStatElement(int x, int y, int width, @Nullable @Nullable net.minecraft.text.Text left, @Nullable @Nullable net.minecraft.text.Text right)
  • Method Details

    • getLeftText

      @Nullable public final @Nullable net.minecraft.text.Text getLeftText()
    • getRightText

      @Nullable public final @Nullable net.minecraft.text.Text getRightText()
    • setLeftText

      public void setLeftText(@Nullable @Nullable net.minecraft.text.Text left)
    • setRightText

      public void setRightText(@Nullable @Nullable net.minecraft.text.Text right)
    • render

      public void render(io.github.thecsdev.tcdcommons.api.client.gui.util.TDrawContext pencil)
      Specified by:
      render in interface io.github.thecsdev.tcdcommons.api.client.gui.TParentElement
      Overrides:
      render in class io.github.thecsdev.tcdcommons.api.client.gui.other.TBlankElement