Jump to content
Bixby Sayz

Color constant stored in a string

Recommended Posts

The short answer is...Hmm there is no short answer.

 

In my scripts I use my own custom type to store colors along with all the other associated info (tolerance, cts, cts params). Been doing this for a couple years now. (On a side note I notice SRL-6 has adopted a similar approach now; guess they learned from the best)

 

The problem with this is if you want to define a color as a constant how do you store a mix of integers and floats as a constant. My solution was to store it as a string and write a function to convert the string to the color record. Which works fine if you stick to using numbers. If you use one of SCAR's built in constants (ie clWhite) it breaks down. So for now I have to simply use numbers even when SCAR has a constant to represent that number.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...