Jump to content
Sign in to follow this  
Guest bartels

Better way to do this? Making a light icon BRIGHT

Recommended Posts

Guest Patrick_Waugh

I got panel light functional using the basic structure:MAKE_ICON( ... BMP_LIGHT_OFF, // Off bmp, followed by on bmp IMAGE_USE_ERASE, // Set bright or not bright in callback ... 2, // Number of icons)MAKE_STATIC // LUMINUOUSTo get the on bmp BRIGHT without the off bmp looking bright I set it in the callback: // Make BRIGHT pelement_icon->image_flags = pelement_icon->image_flags | IMAGE_USE_BRIGHT;and: // Make !BRIGHT pelement_icon->image_flags = pelement_icon->image_flags & ~IMAGE_USE_BRIGHT;which works fine. Since the background can be the off condition, I thought perhaps I should just use 1 icon, and set it to bright, but then I realized that it would always be on, haha.So, seems that only other way to do this would be to just use a BMP_LIGHT_OFF which is just pure RGB(0, 0, 0) black and then turn on the USE_IMAGE_TRANSPARENCY.Opinions?Seems this approach would improve performance by eliminating the need to programatically change the image flags.Patrick

Share this post


Link to post
Share on other sites
Guest bartels

You can either paint BMP_LIGHT_OFF in RGB(0,0,0), or use BMP_LIGHT_ON in the macro and mace sure the callback returns -1 in off state. For MAKE_ICONs it's the same as hide the image.

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