Page 1 of 1
131p6 - .cel scripts cmd: renderflags
Posted: 20.07.2003, 14:23
by don
Ver. 1.3.1 pre6
.cel scripts
In the renderflags command, the "pointstars" option appears to be broken. Maybe due to the UI now having 3 options instead of 2?
Current UI Options:
* Fuzzy Points
* Points
* Scaled Discs
Thus, there should probably be three different star rendering options in the renderflags command.
Posted: 20.07.2003, 19:30
by chris
Scripting needs to catch up with the rest of Celestia . . . There are two ways this could be handled. Either via the set command (which is currently limited to numeric values):
Or a new starstyle command:
I'd prefer to use the set command, but I prefer using a string for the value rather than a number . . . Hmm.
--Chris
Posted: 20.07.2003, 20:38
by don
Hi Chris,
I too like descriptive strings as "items to be selected", instead of trying to remember what number relates to which item.
Since you already have a "set" command for numeric values, maybe you could just duplicate the "set" code for a "setstring" (or something more descriptive) command for setting string values, changing any of the existing numeric validations to string validations?
I know you want to limit the work being done on the celscript side of scripting, so I'm just trying to think of an "easy way out" that would also allow future added string values to be covered also.
-Don
Posted: 20.07.2003, 23:02
by chris
I settled on just letting the set command accept strings . . . I may change the internal implementation of this later, but any modifications will be invisible to script authors.
To set the star rendering style, use:
Code: Select all
set { name "StarStyle" value "fuzzypoints" }
The value may also be points or scaleddiscs.
--Chris
Posted: 21.07.2003, 00:44
by don
Wow!
C++/OO must be a whole lot easier to change things like this than the old languages I used to work in. I thought about this, but figured it would mess up any of the existing functions that used the value passed by "set". Guess not. Very cool !
Thank you Chris. It's now in the Guide.
-Don
Posted: 21.07.2003, 01:23
by don
Hi Chris,
Oops, forgot to ask about "pointstars" in renderFlags. Will this remain and get fixed to point to "StarStyle-points" code, for backward-compatibility (deprecated of course)?
Or?
-Don