Jump to content
Sign in to follow this  
n4gix

Using ICON_SWITCH_TYPE_SET_CUR_USING_RANGE

Recommended Posts

Guest Patrick_Waugh

Ok, thanks Bill for straightening me out before. I now get (after more reading and experimentation) that you only use one MAKE_ICON macro like this:MAKE_ICON( engout_icon, // Name BMP_ANNUNCIATOR_ENGOUT_OFF, // Res_ID NULL, // Next list NULL, // Failure IMAGE_USE_ERASE | IMAGE_USE_BRIGHT, // Draw flags 0, // ASI Flags 0, 0, // Position ENGINE1_N1_RPM, NULL, // Sourc_var, callback ICON_SWITCH_TYPE_SET_CUR_USING_RANGE, // Switch type 2, // Number of icons // Power RPM 0-16384 => 0-100% // icon = offset - (value / scale) 16384, // Scale 0 // Offset)As you can see, I am experimenting with the USING_RANGE.I want the icon change when RPM > 55%. Am I going to have to do this in a callback function?**** 2nd Question ****If I use a callback function, do I just work it so I return the number of the icon I want? I haven't had any luck doing this either.Thanks,Patrick

Share this post


Link to post
Share on other sites
Guest Patrick_Waugh

Hmmmm,Well, I did get a callback version running. So, I guess I just am wondering if it is possible the other way.Patrick

Share this post


Link to post
Share on other sites

>Hmmmm,>>Well, I did get a callback version running. So, I guess I>just am wondering if it is possible the other way.No. You need to use the callback... Unless you want to completely unwind the macro that is... Frankly, I don't think it'd be worth the bother to try. ;)


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

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