colorEditor()
Opens the color editor and writes the names of the color to colstr.
Synopsis
int colorEditor( string &colstr, bool allColors =
true);
Parameters
Parameter | Meaning |
---|---|
colstr | Name of color |
allColors |
Defines which colors can be used. The default value TRUE allows the use of all colors. FALSE restricts the use to static colors. |
Return Value
If successful 0, otherwise -1
Errors
No parameter or incorrect type.
Description
Opens the color editor and writes the name of the color selected there to the string variable colstr. The valid content of the variable colstr may be a color string or a name defined in the editor. However, the color or name string cannot be set to the argument position itself ! A variable must always be transferred. A transfer such as colorEditor("[100,0,0]") is therefore not possible. However, empty strings do not lead to errors.
The additional parameter "allColors" determines if the use of colors is restricted to static colors or if all colors can be used.
Example
Assignment of the color selected from the color Editor to the variable bordercolor.
main()
{
string bordercolor;
colorEditor(bordercolor);
DebugN(bordercolor);
}
Assignment
Simple configuration
Availability
UI