ax.theme¶
Source: gamemode/framework/libraries/cl_theme.lua
Client-side theme registry and glass UI rendering helpers.
Documented functions: 9
Functions¶
ax.theme:DrawGlassBackdrop(x, y, w, h, options)ax.theme:DrawGlassButton(x, y, w, h, options)ax.theme:DrawGlassGradients(x, y, w, h, options)ax.theme:DrawGlassPanel(x, y, w, h, options)ax.theme:Get(id)ax.theme:GetGlass()ax.theme:GetMetrics()ax.theme:GetThemeId()ScaleAlpha(color, scale)
ax.theme:DrawGlassBackdrop(x, y, w, h, options)¶
Draw a glass backdrop layer used for overlays and modal dimming.
Realm: client
Parameters
| Name | Type | Description |
|---|---|---|
x |
number |
Backdrop X position |
y |
number |
Backdrop Y position |
w |
number |
Backdrop width |
h |
number |
Backdrop height |
ax.theme:DrawGlassButton(x, y, w, h, options)¶
Draw a glass-styled button surface. Uses button palette colors and a height-based default corner radius.
Realm: client
Parameters
| Name | Type | Description |
|---|---|---|
x |
number |
Button X position |
y |
number |
Button Y position |
w |
number |
Button width |
h |
number |
Button height |
ax.theme:DrawGlassGradients(x, y, w, h, options)¶
Draw directional gradient overlays for the active glass theme. Any omitted direction uses the current theme gradient color for that side.
Realm: client
Parameters
| Name | Type | Description |
|---|---|---|
x |
number |
Gradient X position |
y |
number |
Gradient Y position |
w |
number |
Gradient width |
h |
number |
Gradient height |
ax.theme:DrawGlassPanel(x, y, w, h, options)¶
Draw a rounded glass panel with optional blur and outline.
Realm: client
Parameters
| Name | Type | Description |
|---|---|---|
x |
number |
Panel X position |
y |
number |
Panel Y position |
w |
number |
Panel width |
h |
number |
Panel height |
ax.theme:Get(id)¶
Get a theme definition by id. Returns the active theme when no id is supplied, and falls back to the dark theme when the requested id does not exist.
Realm: client
Returns
table: theme Theme definition table
ax.theme:GetGlass()¶
Get the active glass color palette with metric-based alpha scaling applied.
Realm: client
Returns
table: glass Resolved glass palette for the current theme
ax.theme:GetMetrics()¶
Get user-configured glass UI metrics. Reads blur, roundness, and opacity scaling values from the options system.
Realm: client
Returns
table: metrics Resolved glass metrics
ax.theme:GetThemeId()¶
Get the active theme identifier from client options.
Falls back to "dark" when the options library is unavailable.
Realm: client
Returns
string: themeId
ScaleAlpha(color, scale)¶
Clone a color with its alpha channel scaled.
Realm: client
Parameters
| Name | Type | Description |
|---|---|---|
color |
Color |
Source color to scale |
Returns
Color|nil: scaledColor Scaled color copy, ornilwhen no color is given