px(n: number) → number return n end
| arg | type | description |
|---|
| n | number | |
get(id: string?) → any
| arg | type | description |
|---|
| id | string? | |
hex(c: string) → void
| arg | type | description |
|---|
| c | string | |
alpha(c: string, a: number) → string
A "#rrggbb" colour with alpha as "rgba(...)".
| arg | type | description |
|---|
| c | string | |
| a | number | |
shade(c: string, t: number) → string
A colour mixed toward white (t > 0) or black (t < 0).
| arg | type | description |
|---|
| c | string | |
| t | number | |
mix(v: number) → number return math
| arg | type | description |
|---|
| v | number | |
luminance(c: string) → number
Relative luminance 0..1 of a "#rrggbb" colour.
| arg | type | description |
|---|
| c | string | |
ch(v: number) → number
| arg | type | description |
|---|
| v | number | |
contrast(a: string, b: string) → number
Contrast ratio between two "#rrggbb" colours (1..21).
| arg | type | description |
|---|
| a | string | |
| b | string | |
inkOn(bg: string) → string
White or near-black, whichever reads better on a colour.
| arg | type | description |
|---|
| bg | string | |
label(text: any, style: any?, props: any?) → any
| arg | type | description |
|---|
| text | any | |
| style | any? | |
| props | any? | |
box(dir: string, style: any?, children: { any }?, props: any?) → any
| arg | type | description |
|---|
| dir | string | |
| style | any? | |
| children | { any }? | |
| props | any? | |
at(x: number, y: number, w: number, h: number, style: any?, children: { any }?, id: string?) → any
An absolutely placed box: left, top, width, height in points, plus style.
| arg | type | description |
|---|
| x | number | |
| y | number | |
| w | number | |
| h | number | |
| style | any? | |
| children | { any }? | |
| id | string? | |
panel(L: any, style: any?, children: { any }?, id: string?) → any
A panel framed in the look.
| arg | type | description |
|---|
| L | any | |
| style | any? | |
| children | { any }? | |
| id | string? | |
button(L: any, o: any) → any
A button in the look: opts { id, text, sub, onClick, primary, disabled, width, height, focused, fontSize, icon }.
| arg | type | description |
|---|
| L | any | |
| o | any | |
chip(L: any, text: string, color: string?, style: any?) → any
A small pill: an amount of a currency, a counter.
| arg | type | description |
|---|
| L | any | |
| text | string | |
| color | string? | |
| style | any? | |
initials(name: string) → string
The initials an item without an icon shows on its token.
| arg | type | description |
|---|
| name | string | |
itemToken(L: any, entry: any, tier: any, size: number, opts: any?) → any
An item token: its icon texture when the pool entry names one, else its initials on a gem in the tier colour. size in points.
| arg | type | description |
|---|
| L | any | |
| entry | any | |
| tier | any | |
| size | number | |
| opts | any? | |