Sign in to follow this  
Guest bartels

xml mouse events, "while mousepress" exist?

Recommended Posts

HiI have this T & B testswitch that I want to operate as long as the mousebutton holds the switch down. Is this possible? Currently I'm stuck with a toggle (on/off clicks) and an automatic timer that shuts it down after 2.5 seconds or so.And again, I'll ask if there is any way of defining multiple types of clicks within the same area definition? Say leftclicking on a knob will increase in ones, righclicking will increase in tens.

Share this post


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

Karl,There are more available tag describers in Arne's xmloptions.txt and in the SDK / inc / gauges.xdr.. The XDR can show you their proper entries I.E. whether it's looking for Yes/No (string) or a number I.E. 400 (enum) and so forth. hope this helps,Roman(KGRB)

Share this post


Link to post
Share on other sites

Karl, Forgot to answer ? 2.. There is not a way (at least so far) for a left/right click, but... There are ways to make some cool stuff.An example of click/double click to do 2 separate items ( based on timer ) : (P:Local Time, seconds) (G:Var9) > (G:Var8) 0 == & if{ (P:Local Time, seconds) 0.33 + (>G:Var9) + 10 (>G:Var8) } els{ (G:Var8) 1 - (>G:Var8) + 0 (>G:Var9) }The previous starts the timer and defines whether it was a click ( (G:Var8) = 10 ) or a double click ((G:Var8) = 9 ). Now to do the resulting action / reset click and reset timer. (G:Var8) 10 == (P:Local Time, seconds) (G:Var9) > & if{ 0 (>G:Var8) + 0 (>G:Var9) + (( DO RESULTING ACTION FOR SINGLE CLICK)) }(G:Var8) 9 == if{ 0 (>G:Var8) + (( DO RESULTING ACTION FOR DOUBLE CLICK)) }Doing it this way you can use just 2 variables to do unlimited clicks/double clicks within a gauge where on 1 click spot Click = some number and Double Click = some number -1 . Problems --- There resulting single click has a 0.33 second delay before activating AND... This code will not work if FS is paused or the Local time is greater than / equal to 23:59:59.66. There are simpler versions of this code to do in a gauge where there is only one click spot of a click/double click variety.The next is a click spot where if you click at the top of the spot will result in a resolution of 1 and if you click at the bottom = resolution of 10, 1/3s down will give a resolution of 3.33 etc...With this you can drag from the 10 down to 1 as you get closer to the required value and you are still holding the click. For adding:(M:Y) 1 max 10 min s1 + ( current variable value ) l1 + ( > new variable value ) For subtracting: (M:Y) 1 max 10 min s1 + ( current variable value ) l1 - ( > new variable value ) Hope this gives some ideas...Regards,Roman(KGRB)

Share this post


Link to post
Share on other sites

:Doh - of course! I can't believe I forgot this one. LOL.:Hope this gives some ideas...Oh, but indeed it does. Thanks to you, I'm not ever get this thing released :DThis simpause and midnight clock issue, you think this should be a major concern? I haven't tested yet, so...Thanks for all useful tips - this goes right into my avsim page storage :)

Share this post


Link to post
Share on other sites

Karl,""Oh, but indeed it does. Thanks to you, I'm not ever get this thing released ""Same here ! Finding something new every once and a while = do over.:-) Your welcome :-)""This simpause and midnight clock issue, you think this should be a major concern? ""Pausing,, No. Using this timer @ 0.33 second.. No. Using a timer of say 10 seconds or more and/or dealing with a flight required variable.. YES. See my previous post http://ftp.avsim.com/cgi-bin/dcforum/dcboa...orum=DCForumID9 on a hypothesis for a fix.. Maybe Arne could help.. Once the clock passes 00:00:00 all is good again.Regards,Roman(KGRB)

Share this post


Link to post
Share on other sites

I haven't followed your discussion too close, but I prefer to use ELAPSED_SECONDS for timer purposes.Arne Bartels

Share this post


Link to post
Share on other sites

Arne, :-)How are you doing ??? Your response on the A:Elapsed Seconds....Doesn't seem to be one available, unless you're talking making ones own as an L: ?? Or... Deriving from L:Var ... From the 747-400 clock. Roman(KGRB)

Share this post


Link to post
Share on other sites

Oops, messd up C-Style and XML, sorry.I think ABSOLUTE TIME should work, but try "number" as unit. I'm not 100% sure, but it was something with hours (or seconds?) from 01.01.0000. Arne Bartels

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