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.

Order of mouse areas in XML-gauges?

Featured Replies

Hello there!I'm still working on my UFC for the PC-21 and it's coming along nicely, but still I got one bugging detail that I just can't get right: the click-areas! I assume I did something wrong with the order of mouse areas and how they're arranged in the xml-file...My question: how should the areas be ordered in the file? I worked with "areas are ordered from left to right for each line, and one line after the other". I mean a rectangular gauge with areas (leters) looking like this:A__B__C_D__E___F__G__would result in the area-codes arranged like:ABCDEFHowever if I do that I get strange results, like clicking the course affects the altitude and similar. I made sure I avoided overlapping areas, so this shouldn't be a problem. Could it be "A,D,F,B,E,G,C" would be the right answer? What are the 'rules' for that?So, if anyone could tell me where I went wrong this time, that would be really appreciated! Thanks a lot and have a nice weekend! :DCheers,Markus

Markus,Really cannot tell you what is wrong because it seems so right...Just maybe some things to try...1. Because this is a self contained attribute you may want to try2.same as above --- OR ---3.Change how you handle the clicks completely.FromTo(>K:COM_RADIO_WHOLE_DEC)Maybe there is a bug in how click "events" are handled in FS. I for one have never used the "events" and just stuck to the (>K:) type handler and never had any problems with the situation you are describing.Hope this can help, wish I had a definite answer for you, kinda stumped also :-)Regards,Roman

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

 

Hi Markus,Have you tried e.g.:instead of??So define Right/Bottom instead of Width/Height.Which is what I always use (I wasn't even aware you could use Height/Width)Cheers, Rob Barendregt

Also,Instead oftry,I've never tried this with the click on the end of the line in this format.We have a tutorial on our site covering the mouse area, so have a read and see if it helps,nick

Hi Rob,For sure the problem does not lay there.I use Height/Width instead of Right/Bottom, and it works perfect.Cheers,Tom

Hi Schindi,From your code:<?xml version="1.0" encoding="UTF-8"?>Now, just try putting :<?xml version="1.0" encoding="UTF-8"?>See it? You need to define the size of your gauge. What you defined was the IMAGE size, not the gauge one.I guess this should resolve the problem.About ordering those structures, well, there is NO order by default; it means you can put code in any sequence and it will work fine providing there is NO overlapping sectors, as Nick said.Another point: if you plan to make your gauge for FS2004 only, there is no need to use "Imagesize". That will save you a lot of coding.Hope this helpsTom

  • Commercial Member

I think the whole problem is with the coordinates of your click spots. You have overlapping click spots, and some aren't located correctly. I mapped a few of them out in Photoshop using a different "color fill" layer for each click spot. See attached image, note the overlaps and placement:http://www.cat-tamer.com/attach/CMA-9000_AP.jpgI also use Width="X" Height="X" without any problems. Nice autopilot, BTW.Jim

Ok, gentlemen, I got it now! Thank you all for your contributions! They all taught me some new tricks to optimise my codes. And especially thanks Jim, for you pointed me the right way for the problem at hand...So, to make a short story even shorter: Schindi is just too stupid!!!Jim, when I saw your pic (thanks for the effort) I thought "wait a minute - those are not the areas I defined!!!" I actually use a CorelDraw vector graphic to plan the gauge, so I can just draw the elements and then read their coordinates and enter them into my code. Now that all would work really well if the idiot which is me wouldn't mix up "Left" and "Width", ha ha!!!I switched now those two words in all cases, and now everything works just perfectly as I want it! Surprise surprise!!!Ok, thanks again for your insights! Gotta go back now and add the last few buttons...With kind regards from Switzerland,Markus

  • Commercial Member

Now that's funny! Sounds like something I'd do, that's for sure. Glad you got it ironed out and thanks for posting back.Jim

  • Commercial Member

I was just playing with your code, I think you meant that you swapped every occurance of "Height" and "Top" rather than "Left" and "Width", correct?Anyway I just tried it and your click spots work perfectly now.http://www.cat-tamer.com/attach/CMA-9000_AP-fixed.jpgGood job of pinpointing the problem :)Jim

>>Good job of pinpointing the problem :)>>JimThanks to YOU, buddy! :DCheers,Markus

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.