Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

XML guages - one button, two functions?

Featured Replies

Is it possible to have a single mouse area do two different things based on right/left mouse click? I've tried (1) two different items (using type="SingleLeft" and type="SingleRight")in the same , or (2) two different s with the same coordinates, neither is working for me.Thanks!

Yep.... it sure is possible :-)Use the same click area just once. (M:Event) 'LeftSingle' scmp 0 == if{ DO THE THING FOR THE LEFT CLICK } (M:Event) 'RightSingle' scmp 0 == if{ DO THE THING FOR THE RIGHT CLICK }Regards,Roman(KGRB)Not a Pilot, but did stay at a holiday inn last night :-)

20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

Ahhh...I didn't think of checking the (M:Event). That's perfect, thanks Roman!Douglas

Now, if I could just figure out how to implement a "press and hold for two seconds" functionality in XML....Douglas

DouglasI too needed some kind of functionality like that and if you're interested it follows:It uses just 1 G:Var. It doesn't use the FS time perse as it would be alot more code. It will work even if paused. It does rely on the to increment the G:Var1 to act as a timer. In these examples the Update Freq. is 6, for other values of freq. just change the activation and limit values for G:var1. Fully tested for operation. Single purpose button, 2 second hold for activation-- (M:Event) 'LeftSingle' scmp 0 == (G:Var1) 120 == ! & if{ (G:Var1) ++ (>G:Var1) (G:Var1) 12 > if{ 120 (>G:Var1) (DO THE OPERATION WITH 2 SECOND PUSH REQUIREMENT) } } (M:Event) 'LeftRelease' scmp 0 == if{ 0 (>G:Var1) }Dual Purpose button, single click for #1 operation ( NON REPEATABLE, must click each time, for instance, to increase some value incrementally) and 2 second hold for activation #2.(M:Event) 'LeftSingle' scmp 0 == (G:Var1) 120 == ! & if{ (G:Var1) ++ (>G:Var1) (G:Var1) 12 > if{ 120 (>G:Var1) (DO THE OPERATION WITH 2 SECOND PUSH REQUIREMENT) } } (M:Event) 'LeftRelease' scmp 0 == if{ (G:Var1) 120 == if{ 0 (>G:Var1) } els{ (DO THE OPERATION WITH SINGLE CLICK REQUIREMENT) 0 (>G:Var1) } }You could also mix and match these two versions to make one click area to do up to 4 operations by nearly adding the same code but using the RightCick+RightRelease click kinds and arguments still only using the 1 G:Var. ( Cause you cannot click two areas at once! )If copying and pasting code from here,,,,, WATCH the spaces... Regards,Roman(KGRB)

20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

Roman,That looks sweet...I'll give it a try tonight. I'm working on a replacement B/K radio stack (to be offered as freeware, eventually, if there's interest) with restored visual and functional fidelity, and this will be great to add that extra bit of realism.Shame on you, you're making this too easy on me... :)Douglas

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.