Class TooltipElementText

java.lang.Object
com.binaris.wizardry.client.gui.elements.TooltipElement
com.binaris.wizardry.client.gui.elements.TooltipElementText
Direct Known Subclasses:
TooltipElementSpellEntry, TooltipElementText.TooltipElementItemName, TooltipElementText.TooltipElementManaReadout, TooltipElementUpgradeList

public class TooltipElementText extends TooltipElement
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
    static class 
     
  • Field Summary

    Fields inherited from class com.binaris.wizardry.client.gui.elements.TooltipElement

    spaceAfter
  • Constructor Summary

    Constructors
    Constructor
    Description
    TooltipElementText(String text, net.minecraft.network.chat.Style style, int spaceAfter, TooltipElement... children)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    drawBackground(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y, net.minecraft.world.item.ItemStack stack, float partialTicks, int mouseX, int mouseY)
    Draws the background layer of this element.
    protected void
    drawForeground(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y, net.minecraft.world.item.ItemStack stack, int mouseX, int mouseY)
    Draws the foreground layer of this element.
    protected int
    getColour(net.minecraft.world.item.ItemStack stack)
     
    protected net.minecraft.client.gui.Font
    getFontRenderer(net.minecraft.world.item.ItemStack stack)
     
    protected int
    getHeight(net.minecraft.world.item.ItemStack stack)
    Returns the vertical height of this element (excluding children or spacing).
    protected net.minecraft.network.chat.Style
     
    protected net.minecraft.network.chat.Component
    getText(net.minecraft.world.item.ItemStack stack)
     
    protected boolean
    isVisible(net.minecraft.world.item.ItemStack stack)
    Whether this tooltip element should be visible for the given item stack.

    Methods inherited from class com.binaris.wizardry.client.gui.elements.TooltipElement

    drawBackgroundLayer, drawForegroundLayer, getTotalHeight

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TooltipElementText

      public TooltipElementText(String text, net.minecraft.network.chat.Style style, int spaceAfter, TooltipElement... children)
  • Method Details

    • getHeight

      protected int getHeight(net.minecraft.world.item.ItemStack stack)
      Description copied from class: TooltipElement
      Returns the vertical height of this element (excluding children or spacing).
      Specified by:
      getHeight in class TooltipElement
    • drawBackground

      protected void drawBackground(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y, net.minecraft.world.item.ItemStack stack, float partialTicks, int mouseX, int mouseY)
      Description copied from class: TooltipElement
      Draws the background layer of this element.
      Specified by:
      drawBackground in class TooltipElement
    • drawForeground

      protected void drawForeground(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y, net.minecraft.world.item.ItemStack stack, int mouseX, int mouseY)
      Description copied from class: TooltipElement
      Draws the foreground layer of this element.
      Specified by:
      drawForeground in class TooltipElement
    • getText

      protected net.minecraft.network.chat.Component getText(net.minecraft.world.item.ItemStack stack)
    • getFontRenderer

      protected net.minecraft.client.gui.Font getFontRenderer(net.minecraft.world.item.ItemStack stack)
    • getColour

      protected int getColour(net.minecraft.world.item.ItemStack stack)
    • getStyle

      protected net.minecraft.network.chat.Style getStyle()
    • isVisible

      protected boolean isVisible(net.minecraft.world.item.ItemStack stack)
      Description copied from class: TooltipElement
      Whether this tooltip element should be visible for the given item stack. Used to conditionally render elements based on item tags or state.
      Specified by:
      isVisible in class TooltipElement