Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:ColorPickerGetColorSpacing

From RoR Wiki

UI Lua API · ColorPicker functions
Version: WAR 1.4.8

Returns the gap between colour swatches in a ColorPicker.

spacingX, spacingY = ColorPickerGetColorSpacing(colorPickerName)

Arguments

colorPickerName
string – Name of the ColorPicker.

Returns

spacingX, spacingY
number – Horizontal and vertical gap in pixels.

Details

  • The initial value comes from the <ColorSpacing x="…" y="…"/> element of the XML definition (0, 0 without it).
  • ColorPickerCreateWithColorTable replaces it with its spacingX and spacingY arguments.
  • The stock UI never calls this function.

Errors

  • Error in function call 'ColorPickerGetColorSpacing': Window %s does not exist
  • Error in function call 'ColorPickerGetColorSpacing': Window %s is not a ColorPicker

Example

A minimal example built from the signature:

local sx, sy = ColorPickerGetColorSpacing( "MyColorPicker" )

See also