Class ScalableText

java.lang.Object
info.u_team.u_team_core.gui.elements.ScalableText
All Implemented Interfaces:
Scalable, net.minecraft.client.gui.components.Widget
Direct Known Subclasses:
ScrollingText

public class ScalableText extends Object implements net.minecraft.client.gui.components.Widget, Scalable
  • Field Details

    • EMPTY_TEXT_CHANGED

      protected static final Consumer<ScalableText> EMPTY_TEXT_CHANGED
    • font

      protected final net.minecraft.client.gui.Font font
    • textSupplier

      protected Supplier<String> textSupplier
    • x

      protected float x
    • y

      protected float y
    • color

      protected RGBA color
    • shadow

      protected boolean shadow
    • scale

      protected float scale
    • textChanged

      protected Consumer<ScalableText> textChanged
  • Constructor Details

    • ScalableText

      public ScalableText(net.minecraft.client.gui.Font font, Supplier<String> textSupplier, float x, float y)
  • Method Details

    • setTextSupplier

      public void setTextSupplier(Supplier<String> textSupplier)
    • getTextSupplier

      public Supplier<String> getTextSupplier()
    • getX

      public float getX()
    • setX

      public void setX(float x)
    • getY

      public float getY()
    • setY

      public void setY(float y)
    • getColor

      public RGBA getColor()
    • setColor

      public void setColor(RGBA color)
    • isShadow

      public boolean isShadow()
    • setShadow

      public void setShadow(boolean shadow)
    • getScale

      public float getScale()
      Specified by:
      getScale in interface Scalable
    • setScale

      public void setScale(float scale)
      Specified by:
      setScale in interface Scalable
    • setTextChanged

      public void setTextChanged(Consumer<ScalableText> textChanged)
    • getTextWidth

      public float getTextWidth()
    • setText

      protected void setText(String newText)
    • updatedText

      protected void updatedText()
    • render

      public void render(com.mojang.blaze3d.vertex.PoseStack poseStack, int mouseX, int mouseY, float partialTicks)
      Specified by:
      render in interface net.minecraft.client.gui.components.Widget
    • renderFont

      protected void renderFont(com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.gui.Font font, float x, float y)