Package me.hackware.api.gui
Class ClickGuiTab
java.lang.Object
me.hackware.api.gui.ClickGuiTab
A single ClickGUI tab — the sub-screen shown when its tab is selected in the
top tab bar.
Every tab has a stable, namespaced id (e.g.
"hackware:clickgui:modules"), a human-readable name
shown on the bar, and an order that sorts it left-to-right.
Tabs are registered at runtime, so the built-in
Modules / HUD Editor tabs and any future plugin tabs go through the same path:
a plugin can add a brand-new tab, or register a tab under an existing id to
replace that surface's rendering wholesale.
The active TabHost is passed to every hook rather than captured,
so a single tab instance is shared across screen re-creations. All input hooks
default to "not consumed"; override only what the tab needs.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbarShouldYield(TabHost screen, int leftPx, int topPx, int rightPx, int bottomPx) ForhideBarWhenActive()tabs only: whether the bar should currently yield (hide) given its on-screen pixel rectangle.booleanbooleanWhentrue, the tab bar auto-hides while this tab is active (revealing on hover) and is drawn on top of this tab's content instead of above it.final Stringid()Stable, namespaced identifier (e.g.voidCalled once when the host screen (re)builds its tab list.booleanWhether this tab is a Studio surface (Macros / Profiles / Relations / Statistics).booleankeyPressed(TabHost screen, net.minecraft.client.input.KeyEvent event) booleanmouseClicked(TabHost screen, double mouseX, double mouseY, int button) booleanmouseDragged(TabHost screen, double mouseX, double mouseY) voidmouseReleased(TabHost screen, double mouseX, double mouseY, int button) booleanmouseScrolled(TabHost screen, double mouseX, double mouseY, double amount) final Stringname()Display label shown on the tab bar.voidonActivate(TabHost screen) Called when this tab becomes the active tab.voidonDeactivate(TabHost screen) Called when this tab stops being the active tab, so it can persist state.final intorder()Sort key for the tab bar (ascending, left to right).abstract voidDraw this tab's content.
-
Constructor Details
-
ClickGuiTab
-
-
Method Details
-
id
Stable, namespaced identifier (e.g."hackware:clickgui:modules"). -
name
Display label shown on the tab bar. -
order
public final int order()Sort key for the tab bar (ascending, left to right). -
hideBarWhenActive
public boolean hideBarWhenActive()Whentrue, the tab bar auto-hides while this tab is active (revealing on hover) and is drawn on top of this tab's content instead of above it. Used by the HUD editor so its elements can sit under the bar. -
isStudioSurface
public boolean isStudioSurface()Whether this tab is a Studio surface (Macros / Profiles / Relations / Statistics). Studio tabs get the clipped frosted-glass backdrop blur behind their panel and the tab bar (seeStudioBlurShader); other tabs manage their own background. -
barShouldYield
ForhideBarWhenActive()tabs only: whether the bar should currently yield (hide) given its on-screen pixel rectangle. Default always yields; the HUD editor overrides this to keep the bar shown unless an element actually sits beneath it. -
init
Called once when the host screen (re)builds its tab list. -
onActivate
Called when this tab becomes the active tab. -
onDeactivate
Called when this tab stops being the active tab, so it can persist state. -
render
public abstract void render(TabHost screen, net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY) Draw this tab's content.mouseX/mouseYare in screen space. -
mouseClicked
-
mouseDragged
-
mouseReleased
-
mouseScrolled
-
keyPressed
-
charTyped
-