Sign in to follow this  
Guest Skymed

Looking to detect Mouse Events in XML Gauges.

Recommended Posts

1) In particular, I'm trying to detect a mouse_btn_down vs. up condition. Namely so that I can program a button on a panel to stay down while the user is "pushing" it with the mouse click.I have succeeded in coding a button that will stay down briefly and then pop back up, but I want a button that will move in/out with the mouse btn.2) Second question: I've noticed that with helicopters (at least) that the mixture_rich is controling the start, vs. a "starter". So, merely closing a fuel_valve starts the engine, vs. just closing a fuel_valve. What controls which variable "starts" the engine???In other words, is it possible to change this?3) Third question: Is is possible to tied keypresses or joystick buttons to "L" variable?Thanks for any help.Code I'm working with:(A:Electrical master battery, bool)(L:isBtnIn, bool)Starter @isBatteryOn if{ (A:General eng1 fuel valve, bool) 0 == if{ (>K:TOGGLE_FUEL_VALVE_ENG1) } 1 (>K:MIXTURE1_RICH) } els{ } Why am I doing all this? Because I want the "starter" sound when the button is pushed, even if the fuel_valve is "open/off".Thanks

Share this post


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

Ok, managed to solve the btn down problem with code like this:Starter (M:Event) 'LeftSingle' scmp 0 == (L:isBtnIn, bool) 0 == and if{ 1 (>L:isBtnIn, bool) } (M:Event) 'Leave' scmp 0 == (L:isBtnIn, bool) 1 == and if{ 0 (>L:isBtnIn, bool) } So, now my question one above could be phrased, "What 'M:Event's are there? Anyone have a test gauge that could help me here?Thanks

Share this post


Link to post
Share on other sites

Wow, looks pretty interresting. Sorry, haven't dived into M:types yet, but I've noticed some (to me) bizzare things in the GPS code. In FS2002 I think we came to the conclusion that multiple choice mouse events wasn't possible, but now I'm starting to wonder (yet again). I.e. in the DC3, the feathering handles doesn't react to the right mouse button _at_all_! No popup menu or anything. Suggests indeed that it has been possible.But for me, I live in a world with where only left mouse button works :Don't know about helicopters, but I made a priming function on my personal C172 where when the starter was used, temperatures was checked agsinst an L:HasBeenPrimed,bool. If false, the an invisible fuel valve would simply shut off. If primed, the fuel valve was turned back on and engine would start.

Share this post


Link to post
Share on other sites

PatrickI have been searching for a start-up sequence for the Bell helicopter myself. Seems to me, it doesn't have a starter per se, but, as you pointed out, it fires up when the mixture is rich. I have been experimenting to get a normal start sequence but no joy as yet.I have been looking in the cab files for the 747, R22, DC3 and baron, and these have start sequences, but they must also have "starters", unlike the 206.If you Do find out the how to, I would appreciate it if you would post it here.Steve

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