Jump to content
Sign in to follow this  
glassman2005

PGAUGE variable question

Recommended Posts

Does anybody know what pgauge->x_adjust and pgauge->y_adjust represent? They are fractional numbers, and I assume they have something to do with positioning of the gauge on the panel.The variable pgauge->position.x and pgauge->position.y seem to tell me a position, but those appear to be relative to something other than the top of the screen, perhaps relative to the top of the panel background? The variable pgauge->size_x_mm and size_y_mm tell me the size as specified in panel.cfg, but I'm not sure if those are of any use with regards to finding a gauge's absolute position on the FS window.So 2 questions:1. What are x_adjust and y_adjust?2. If position.x and position.y are relative to the panel background, is there anything that tells me the position of the panel background (not the gauge background, the panel background).

Share this post


Link to post
Share on other sites

I can now clarify some details in my own question above. It apepars that pgauge->x_adjust and pgauge->y_adjust are simply the scaling factors used in sizing the gauge to fit onto your current FS window shape. These adjustment numbers, multiplied with your gauge's original background size, will arrive at the values stored in pgauge->size.x and pguage->size.y.But this still leaves me looking at pgauge->position.x and pgauge->position.y and knowing that those values are definitely not relative to the top of the FS window. Any ideas?

Share this post


Link to post
Share on other sites

And more informaton to clarify my own question, I can get the correct panel window, but interestingly, the DC for the panel window is not valid until after the panel has been undocked then re-docked, probably initalizing something that otherwise isn't initialized. Almost there, though :)

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...