Jump to content
Sign in to follow this  
Guest taku

How to change colors of "STRINGS"?

Recommended Posts

Guest taku

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
Guest Karl R Pettersen

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
Guest bartels

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
Guest taku

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
Guest taku

Great!Thank you Doug for answer my questions.

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...