Jump to content
Sign in to follow this  
Guest bartels

Dynamic SCALE in XML possible ??

Recommended Posts

In the XML code:(G:Var1)I want to use a dynamic SCALE instead of a static value.I.o.w., read the Scale value from a variable instead of the numerical value "4.9".However, using gives an XML parsing error.Any suggestions ??Thanks, Rob Barendregt

Share this post


Link to post
Share on other sites
Guest bartels

Tried?It might not work at all. WithColor="%((L:EICAS lamp bright,number) 0x7f + 0x100 * )%"I got at last a dimmable String.Arne Bartels

Share this post


Link to post
Share on other sites

Color="%((L:EICAS lamp bright,number) 0x7f + 0x100 * )%"Hi Arne, very interesting. This works great. Gives green as the colour. Is there a way to chose different colours?Nick.

Share this post


Link to post
Share on other sites
Guest bartels

Any colour you want (RGB). It might have been simpler to understand by using something like:Color="%( 0x00ff00 (L:brightness,number) * near )%"With (L:brightness,number) between 0.0 (dark) and 1.0 (full lit). 0x00ff00 the RGB colour value (0xff = 255 for green part, 0 for the others).Arne Bartels

Share this post


Link to post
Share on other sites
Guest bartels

I suspected something like this, some parameters are simply not dynamical. After all you can try to use and do a bit of trickery in the corresponding line.Arne Bartels

Share this post


Link to post
Share on other sites

Actually I also needed it for the "X" and "Y" position, for which it doesn't work either.But as you said: it can all be easily solved by including correct scale and offset calculation in the line.Why didn't I think of that ???Sometimes solutions are just too trivial :-) :-)Thanks for the help.Cheers, Rob

Share this post


Link to post
Share on other sites

Hi Arne,I'm producing zero to one using a slider gauge with drag function, (M:X) 100 / 0 max 1 min 1 r - Adjust gauge brightness (%((L:bright,number) 100 *)%!3d!%%)@BrightClick (>L:bright,number)Color="%(0x00ff00 (L:bright,number) * near)%" works great, but the colour during drag tends to change through various shades of yellow and red. How can we keep the colour green at all brightness levels.Also, I change the line to Color="%(0xff0000 (L:bright,number) * near)%" expecting red but the text does not display. Same with 0x0000ff, expecting blue.Help!Nick.

Share this post


Link to post
Share on other sites
Guest bartels

Trying out before posting would have been a better idea I think. Don't have the time for serious trying out though. I'm away on business the next days. Maybe you work with single "colour channels", and stick them together later? A number between 0x00 and 0xff multiplied by 0x01 is blue, multiplied by 0x100 is green, multiplied by 0x10000 is red and then adding all chennels together.Arne Bartels

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...