May 13, 200422 yr I made a gauge that adds funcionalities for an almost dummy button. My gauge detects a mouse click and perform some actions, however the dummy gauge under my gauge must also receive the mouse click. As far I understood putting my gauge over the button blocks the mouse detection for the button. Is it possible to have both gauges receiving the mouse event?ThanksJos
May 13, 200422 yr Not directly. If both gauges are part of the same multigauge you can use variables that are accesable from both gauges though. You could use the same mouse function for both gauges, etc..Arne Bartels
May 13, 200422 yr Hey Jose,Arne is right, easiest way is to use the same mouse function in the MOUSE_CHILD_FUNCT for the second gauge.
May 13, 200422 yr Thanks, the gauges are distinct. It seems that I will have to intercept the mouse messages or make a direct input function and check it instead of using the MOUSE_CHILD_FUNCT. Jos
May 14, 200422 yr Author Moderator >Thanks, the gauges are distinct. It seems that I will have to>intercept the mouse messages or make a direct input function>and check it instead of using the MOUSE_CHILD_FUNCT. Why not simply pass the event via a broadcast variable to your 'dummy gauge?' The 'dummy gauge' could then execute whatever function you want based on the bool value of the received variable... :) Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
May 14, 200422 yr I'm new to gauge programming but from my other (real?) job, I'd try to use a windows message and send it to the handle of the second gauge (message forwarding). That's commonly done with cascading controls. The only thing you need to know is how FS9 handles messages but redirect the target.Of course, it implies you can trap the message through the linkage, perhaps through a registered panel var?
May 14, 200422 yr Author Moderator That's too complicated a solution to a trivial problem.In the 'transmitting gauge,' simply create a 'broadcast' (i.e. shared) variable: for example, master_warnIn the 'receiving gauge,' create a 'receive' variable with the same name as before, but prefixed with an asterisk, e.g., *master_warn," as well as a local version of the same variable, "warn_on."To 'bullet proof' the code and prevent any errors, simply check that the memory location actually has the value stored from the broadcast gauge:if ( master_warn != NULL ) { warn_on = *master_warn ; }the later on,if warn_on = 1 { do something } else { do something else ; } Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
Create an account or sign in to comment