Class BarComponent

java.lang.Object
mcp.mobius.waila.api.component.BarComponent
All Implemented Interfaces:
ITooltipComponent

@ClientOnly public class BarComponent extends Object implements ITooltipComponent
Component that renders a colored bar.
  • Constructor Details

    • BarComponent

      public BarComponent(float ratio, int color)
      Parameters:
      ratio - the ratio of the filled bar between 0.0f and 1.0f
      color - the bar color, 0xAARRGGBB
    • BarComponent

      public BarComponent(float ratio, int color, String text)
      Parameters:
      ratio - the ratio of the filled bar between 0.0f and 1.0f
      color - the bar color, 0xAARRGGBB
      text - the text that will be shown in the middle of the bar
    • BarComponent

      public BarComponent(float ratio, int color, Component text)
      Parameters:
      ratio - the ratio of the filled bar between 0.0f and 1.0f
      color - the bar color, 0xAARRGGBB
      text - the text that will be shown in the middle of the bar
  • Method Details