2015-09-09

FULL SCREEN GAUGES!

I think this is the most significant breakthrough I've made so far, I have discovered how to use the full screen of the FIP while still allowing the side buttons to work!


In order to do this, you need to set the background image to 320x240, (that's the first <Image> tag in your gauge and not in an <Element>), which is what I was missing. In order to allow you to use this extra space unimpeded, I suggest you remove the Name="" from the <Button> Definition. If you don't want the button to be used for anything and want the light to go out, exclude the <Button> definition alltogether. Here's my definition from XSaitekProFlight.xml:

  <Gauge Timeout="100" RootFolder="Relative" File="Gauges\HSI_sjs\HSI_sjs.xml">
    <Button Id="3" Event="sim/autopilot/hsi_select_gps" Type="Command"/>
    <Button Id="4" Event="sim/autopilot/hsi_select_nav_1" Type="Command"/>
    <Button Id="5" Event="sim/autopilot/hsi_select_nav_2" Type="Command"/>
    <Button Id="6" Event="sim/autopilot/heading_sync" Type="Command"/>
    <Button Id="7" Event="sim/radios/obs_HSI_down" Type="Command" />
    <Button Id="8" Event="sim/radios/obs_HSI_up" Type="Command" />
    <Button Id="11" Event="sim/autopilot/heading_down" Type="Command" />
    <Button Id="12" Event="sim/autopilot/heading_up" Type="Command" />
  </Gauge>


As you can see, buttons S1 and S2 aren't used, whereas S3-S6 have functions to perform when pressed, as do the two knobs. S1 and S2 will be unlit and all the buttons work perfectly as desired, but I can now use my own less intrusive button labeling and fit way more into my gauges! This does require the correct settings be made in XSaitekProFlight.xml for my gauge (otherwise the gauge either won't appear properly or the buttons won't do what the labels say as the labels are now hard-coded into the background image of the gauge - to my mind, however, this is a small price to pay for use of the full screen.

Once you've done that in XSaitekProFlight.xml, go to your guage.xml file and put the <Image> tag in there with the sizes specified, like this...

    <Image Name="HSI_sjs_BG_main.bmp" ImageSizes="320,240,320,240" />


...and Bob does seem to be your Father's Brother! Note that the sizes need to be set in this ImageSizes attribute; the size of your background image defines the usable size of the screen, and if you have a 240x240 background any elements you draw over it will be clipped to this size. This is the bit that was throwing me previously when I had thought using the full screen was an impossible task!

It really was as simple as having a full size background and no Name attributes - I'm almost kicking myself, but I'm overwhelmingly relieved to have discovered where I was going wrong. Enjoy!

I'll be back soon with my HSI for you all to try :)

SteJ
# 3

No comments:

Post a Comment

Please feel free to leave comments, add questions, correct my errors, leave handy hints, suggest additions, request new gauges and so forth - No abuse please, and no flaming each other!