yesterday
Hi there, is it possible to do a colored square (with R, G, B) or so in the "UI Script" ?
I found only that you can put a picture from the bib, or de Pre-picture from your object in the script.
In the GDL reference guide, there it is;
UI_COLORPICKER "redParamName", "greenParamName", "blueParamName", x0, y0 [, width [, height]]
But I don't unterstand that to do......
Otherwise, the reference guide is not bad, but some script example, I don't see "preview example = result".....
> all for UI_ scripts.....
Solved! Go to Solution.
yesterday
As far as I know, it is not possible with a UI-Command to create a colored field.
In these cases I always use the UI_PICT command and place colored pictures as you did.
yesterday - last edited 3 hours ago by Laszlo Nagy
Hi @Andreas81ch ,
If I understand your request properly, UI_COLORPICKER does exactly that
In your Parameters List, you should have 3 parameters of Real type :
- "Red" (or any name you want)
- "Green" (or any name you want)
- "Blue" (or any name you want)
In the Parameter script (it's not necessary but it's better)
values "Red" range[0, 1]
values "Green" range[0, 1]
values "Blue" range[0, 1]
In the Interface script
xStart = 5
yStart = 5
width = 40
height = 40
UI_COLORPICKER "Red", "Green", "Blue", xStart, yStart, width, height
On mac, this should give you this result (a clickable square of 40x40 px placed at 5, 5 in the UI). Second picture is what you get when you click on the square.
yesterday
Hi there, thanks for this tutorial.
But I want not to pick a color, just a field with a custom RGB color;
I made this exmaple with colored pictures in my biblio.
But no way to make so, with custom RGB command ?
yesterday
As far as I know, it is not possible with a UI-Command to create a colored field.
In these cases I always use the UI_PICT command and place colored pictures as you did.
yesterday
Ah I didn't get it then, my bad. I do not believe that what you ask is possible but maybe there's something I don't k,ow.