Sign in to follow this  
Guest taku

How to change colors of "STRINGS"?

Recommended Posts

Hi all.Is there any way to change the colors of strings other than duplicate "MAKE_STRINGS" with SHOW/HIDE macros. I want to change the color of strings when number goes over limit value (eg.engine temperature coming to overheat). I know that I can do thisby duplicate "MAKE_STRINGS" but I want to know if I can do the same by other way.

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

I'm using the string conditional in these cases. Goes something like:Color="%('#FF5A5A' '#AA0000' (L:YourTest,bool) ?)"Sorry, didn't realize the C syntax. Maybe there is something similar there?

Share this post


Link to post
Share on other sites

Actually there is a way in C:try pelement->fg_color=RGB(xx,yy,zz);in the callback function of the MAKE_STRING.Arne Bartels

Share this post


Link to post
Share on other sites

Karl and Arne, Thank you so much.I'm using C only, so Arne's suggestion is very helpful.How easy this is! I understand that in MAKE_STRING macro,still put RGB colors as the default color, and in the callback put new color. How about set color back to the default color?Just assign the color as new color in the callback?I have no inconvenient with this way, but if there is a way,I want to know.Your Sincerely,Taku

Share this post


Link to post
Share on other sites

Taku,This worked well for meif ( PANEL_LIGHTSvar.var_value.n == 1 ) { pelement->fg_color = RGB(255,255,255) ; } else { pelement->fg_color = RGB(255,128,64) ; }Colour will now toggle, based on the value of the Panel_Lights variable.Doug

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this