by Vincent » Thu Oct 29, 2009 6:38 am
I've been thinking about the best way to set the text color from a script...
The first option would be to add the color as the seventh argument of the celestia:print method.
This option has a disadvantage, though: script writers would have to specify all the seven arguments,
i.e., the following code would return an error: celestia:print(text, color)
One should write, instead: celestia:print(text, duration, horig, vorig, hoffset, voffset, color),
which would be both confusing and inconvenient.
A second option would be to add a new celestia:settextcolor method,
so that one could write: settextcolor(red, green, blue)
This option is both simplier and handier: the color set during a script will remain even after the
script is terminated, which gives the possibility to customize the color of the Celestia messages.
Also, it is more relevant with the syntax of the setlinecolor and setlabelcolor methods.
I should have a patch ready quite soon which uses the latter.
@+
Vincent
Celestia SVN 1.6.1 +
Lua Edu Tools v1.2GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3