Sign in to follow this  
Guest HC001ST - Stick

C gauge push btn

Recommended Posts

Hey,Anyone created a button in .c that stays pushed with the push of the mouse button and releases with the button?I can do this in XML fine, but overlapping FUCNT's don't seem to work in .c.

MOUSE_BEGIN( button_mouse_rect, 0, 0, 0 )  MOUSE_CHILD_FUNCT( 0, 0, 90, 90, CURSOR_NONE, MOUSE_LEFTSINGLE, push_btn_mcb )  MOUSE_CHILD_FUNCT( 0, 0, 90, 90, CURSOR_NONE, MOUSE_LEAVE, release_btn_mcb )  MOUSE_TOOLTIP_STRING ("My button")MOUSE_END

Anyone found a way to do this?

Share this post


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

Yes, use the mouse flags in the MOUSE_CHILD_FUNCT for the down buttons using the or (|) to add to the mask.Check against the mask in the callback function for this flag, set a boolean variable, and in the icon callback for the button, use that flag to pick a bitmap that shows the button in the proper position.Hope this helps.

Share this post


Link to post
Share on other sites

It does.I had thought of this approach earlier, in concept, but now I know it works. Thanks.

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