API:ColorPickerGetColorSize
From RoR Wiki
UI Lua API · ColorPicker functions
Version: WAR 1.4.8
Returns the size of one colour swatch in a ColorPicker.
width, height = ColorPickerGetColorSize(colorPickerName)
Arguments
- colorPickerName
string– Name of the ColorPicker.
Returns
- width, height
number– Swatch size in unscaled pixels.
Details
- The value comes from the
<ColorSize x="…" y="…"/>element of the ColorPicker's XML definition. Without that element both values are 1. - There is no Lua function to change it.
- The stock UI never calls this function.
Errors
Error in function call 'ColorPickerGetColorSize': Window %s does not existError in function call 'ColorPickerGetColorSize': Window %s is not a ColorPicker
Example
A ColorPicker definition, from default/ea_chatwindow/source/chatoptionswindow.xml:
<ColorPicker name="$parentColorPicker" texture="EA_HUD_01" columnsPerRow="4">
<ColorTexCoords x="304" y="450" />
<ColorTexDims x="24" y="24" />
<ColorSize x="28" y="28" />
<ColorSpacing x="5" y="5" />
For this window, ColorPickerGetColorSize( "ChatOptionsWindowColorPicker" ) returns 28, 28.
