Package me.hackware.api.gui
Class Card
java.lang.Object
me.hackware.api.gui.Card
A rounded surface with a hairline border and optional cheap elevation — the
base container for panels, list rows and editor sections in the Macros tab.
The default fill mirrors the module panels' category background (colour and
opacity) from the theme, so the tab matches the Modules tab surfaces.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidstatic voiddraw(me.hackware.api.gui.UiContext, int, int, int, int)with an explicitbordercolour — so a host animating the card's opacity can fade the ring in step with the fill instead of leaving an opaque outline hanging over a half-faded surface.static intradiusPx(double res) RADIUSconverted to physical pixels for the given res (physical-per-logical).
-
Field Details
-
RADIUS
public static final int RADIUSCard corner radius in logical units. Scaled to physical pixels by the GUI res at draw time (seeradiusPx(double)) so cards read equally round on any display / GUI scale — a fixed physical radius looks too round at low res and barely round on a high-DPI (Retina) screen.- See Also:
-
-
Method Details
-
radiusPx
public static int radiusPx(double res) RADIUSconverted to physical pixels for the given res (physical-per-logical). -
draw
-
draw
public static void draw(UiContext ui, int x, int y, int w, int h, int radius, int fill, boolean elevated) -
draw
public static void draw(UiContext ui, int x, int y, int w, int h, int radius, int fill, boolean elevated, int border) draw(me.hackware.api.gui.UiContext, int, int, int, int)with an explicitbordercolour — so a host animating the card's opacity can fade the ring in step with the fill instead of leaving an opaque outline hanging over a half-faded surface.
-