Sign in to follow this  
badderjet

RIGHT Mouse Button

Recommended Posts

In the Airbus panels, the FCU buttons can be pushed or pulled for selected or managed mode. To simulate this in my panels, the virtual pilot can use the LEFT or RIGHT button of the mouse to push or pull the FCU buttons. In the code, I use the mouse button identifiers MOUSE_LEFTSINGLE and MOUSE_RIGHTSINGLE.It works fine for everybody, except 2 or 3 users, who can not pull the FCU buttons (right mouse button action). It means that the right mouse button is not identified for them. Only the left button press works.Any idea?Thanks for any help !!Eric

Share this post


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

Here is what I do:- in the right mouse rectangle:MOUSE_CHILD_FUNCT( 81,50,13,13, CURSOR_HAND, MOUSE_LEFTSINGLE | MOUSE_RIGHTSINGLE, MyCallbackFunction)- in the callback function:...if (mouse_flags == MOUSE_LEFTSINGLE){ // Operation to be done when left mouse is pressed}else{ // Operation to be done when right mouse is pressed}I think the problem is that for some people, the right mouse button is seen by the system as the middle mouse button. I will try to change the code in the mouse rectangle by:MOUSE_CHILD_FUNCT( 81,50,13,13, CURSOR_HAND, MOUSE_LEFTSINGLE | MOUSE_RIGHTSINGLE | MOUSE_MIDDLESINGLE, MyCallbackFunction)

Share this post


Link to post
Share on other sites

Eric,essaye comme ca plutot:if ((mouse_flags & MOUSE_LEFTSINGLE) != 0)Ce sont des bits, pas des valeurs. Quand un utilisateur presse les deux boutons, le mouse_flags est alors egal a MOUSE_LEFTSINGLE + MOUSE_RIGHTSINGLE.

Share this post


Link to post
Share on other sites

Je sais que ce sont des bits, mais c'est bien un == que je veux. En effet, je ne veux PAS que le code soit execut

Share this post


Link to post
Share on other sites

Stop it, you two!:-lol Your killing my translator this early in the morning!!!:-lol

Share this post


Link to post
Share on other sites

Sorry for this... Here is the translation:Jean Luc was saying that the mouse flags were bit coded information, and not values, so this should be tested with something like:if ((mouse_flags & MOUSE_LEFTSINGLE) != 0)so that it works even if the user presses both left and right buttons.I replied that I knew that, but I want my code to be executed only if the left button is pressed, and no other button. This is why I used == to test the direct value.Nothing very complex here...Eric

Share this post


Link to post
Share on other sites

Hi Eric,NO NO!value & flag means that the test pass only if the flag bit is in value.Try it! I can assure you I do left/right/middle push/wheel in a single clickspot with these kind of tests... :-)To avoid the user triggering an action in pressing both mousse buttons, you could do:if ((mouse_flags & (MOUSE_LEFTSINGLE|MOUSE_RIGHTSINGLE)) == MOUSE_LEFTSINGLE)!

Share this post


Link to post
Share on other sites

You understood but I'm not sure Rocky and Jean Luc_ got it. It was a joke son, a joke!! They probably missed something in the translation!! All in good fun!!Anyway Rocky, thanks for the translation!!

Share this post


Link to post
Share on other sites

Eric,We all love your excellent pannels for 320 /330 and many of us would like to mabe buy you shareware 340 panel.BUT you say that 2 or 3 users cannot use the "pull" option with the right CLICK. We have ask all around us and NOBODY has ever seen something working in FS2002 with the right button of the mouse.So where are the users who can do that ?cheersronalito

Share this post


Link to post
Share on other sites

My Airbus panels (freeware and shareware) are used by thousands of virtual pilots, including myself. If works perfect for almost everybody, including myself. I think the 2 or 3 users for which it doesn't work have a difference in their mouse driver, so the right mouse button is considered as the middle button. I have corrected my Airbus panels so that the left btton makes the PUSH action, and any other button (middle or right) triggers the PULL action.Eric

Share this post


Link to post
Share on other sites

If you want to test this feature, you can download my A320 or A330 panel (freeware) and test if it works fine. The A340 panel uses exactly the same code for the FCU, so if it works in the A320/330 panel, it will work in the A340 also.Eric

Share this post


Link to post
Share on other sites

Hi, I went to your site and dowloaded your 320 Panel. But it is exactly the same version I got a more than a month ago, long before all these comments on this site started. So where can I find the "New" version with the mouse "left/center" button fixed.Sorry for the trouble, but it stil does not work.Cheersronalito

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