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.

Small question programming a Gauge

Featured Replies

Hi all, 

I bought AAO recently and I am starting to programme my first gauges using the XML code. Y am learning throgh reading the XML code in the gauges suplied by AAO, so my knowledge is somehow limited. I am doing a gauge that reads the ADF freq and displays it on a screen, and I have several buttons to change the individual digits. My idea is using the gauge with planes wich have no ADF (like the new B247 by wing42). The gauge also recognise if the plane has a stanby freq and in that case shows it as well. I almost finish the programming part but i found a little problem I want to fix. When there is an available STBY ADF, it also shows a button to swap both freqs, I manage to not shown it when there is no STBY ADF available, but the click area is there and it is active. I do not know if there is a way to make the area NOT active in the same way I made the button not visible. That instructiion does not work with mouse areas:

When i do not want the button to be shown I  do this: 


<Element>
    <Visible>(A:ADF STANDBY AVAILABLE, Bool) 1 == </Visible>
    <Position X="196" Y="180"/>
    <Image Name="SwapKnob.png" ImageSizes="64,64,64,64" >
    <Axis X="32" Y="32" />
    </Image>  
</Element>

 

And the area of that knob is 

<Area>
               <Position X="196" Y="180"/>
                <Size X="64" Y="64"/>
                <Click Event= "ADF1_RADIO_SWAP"/>
 </Area>

But there is no way of making the area (visible / not visible as I made the knob with the line in bold. Does anyone know the way of doing it????

 

 

Edited by Ala13_Kokakolo

  • Commercial Member
58 minutes ago, Ala13_Kokakolo said:

But there is no way of making the area (visible / not visible as I made the knob with the line in bold. Does anyone know the way of doing it????

Sorry, but this is not possible. A mouse area doesn't have a Visibility property in AAO. The gauges use only a simplified XML dialect, not the full simulator specs. It is more like FS9 than FSX.

"they way of doing it" would be a work around -  calling an RPN script instead of the K-Event, that uses the condition that you wanted to put into the visibility tag to trigger the actual event - or not.

Edited by Lorby_SI

LORBY-SI

  • Author

Thanks for the response. Is there anywhere I can read the documentation about this XML dialect? It would be very useful to know what is and what is not available.

  • Commercial Member

What is says in the "Gauges and Scripts" PDF in chapter 2.4 - 2.6 is actually all there is (where visibility is only listed for Elements and not for mouse Areas). The example in 2.6 should show all tags, but granted, there is no further explanation about how to use them (because it should be the same as in the SDK doc). And there are my example gauges on the AxisAndOhs website that should cover all use cases.

This is the XSD for the gauges, maybe it helps?
https://www.dropbox.com/s/d86f9ywuyq0ykfw/LorbyGauge.xsd?dl=0

Please note that the XSD has been built from the current devel version of AAO - "<Visible>" for mouse areas will be there in version 2.29, I've just tested it. It will not phyiscally hide the mouse area though, it will just disable the mouse action.

And the <Cursor> tag is there for compatibility reasons, it has no effect..

 

Edited by Lorby_SI

LORBY-SI

  • Author

Will be possible to also add right and left click events for the mouse? Cheers 

Archived

This topic is now archived and is closed to further replies.

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.