Class Tab

java.lang.Object
me.hackware.api.gui.studio.Tab

public final class Tab extends Object
A single tab within a Tabs strip: a Tabs.PADDING_H-padded label, drawn white when active else grey with a drop shadow, vertically centred in the caller's rowH row. Stateless renderer — the strip owns spacing, the sliding hover background and the active-underline indicator.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    draw(net.minecraft.client.gui.GuiGraphics g, net.minecraft.client.gui.Font font, String label, int x, int top, int rowH, boolean active, float opacity)
    Draws the tab's label at x, centred in a rowH-tall row whose top is top.
    static int
    width(net.minecraft.client.gui.Font font, String label)
    Full width of a tab for label (label + Tabs.PADDING_H on each side).

    Methods inherited from class java.lang.Object

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

    • width

      public static int width(net.minecraft.client.gui.Font font, String label)
      Full width of a tab for label (label + Tabs.PADDING_H on each side).
    • draw

      public static void draw(net.minecraft.client.gui.GuiGraphics g, net.minecraft.client.gui.Font font, String label, int x, int top, int rowH, boolean active, float opacity)
      Draws the tab's label at x, centred in a rowH-tall row whose top is top.