User Tools

Site Tools


gui (Module)

Utilities for GUI applications.


colorAlpha ( colorVector, alpha : Number )

Returns a new color with the alpha value changed to alpha.

colorMix ( a, b, amount : Number )

Returns a color where vectors a and b are interpolated by amount. If amount is 0, the result is a; if amount is 1, the result is b.

dpiScaledImagePath ( path : Text )

Returns a version of path where “@2x” is appended to the end if DisplayMode.PIXEL_RATIO is 2 (approximately).

scale ( value, factor : Number )

Scales a value by factor. If value is a text string, the suffixes “pt” and “px” (point, pixel) are retained in the result.

Value to scale. Number or Text, may have “pt” or “px” as suffix.
Scale factor.

setDefaults ( d : Record )

Populate record d with the default configuration variables for a GUI app.

script/module/gui.txt · Last modified: 2019-11-17 18:55 by skyjake