Jump to content
Sign in to follow this  
Gridley

Coordinates for AREA LEFT and AREA RIGHT relative to bi...

Recommended Posts

Trying to make a simple XML heading bug. I've got a 30px knob bmp but for some reason my mouse hot spots are offset from the bitmap...Can anyone help with which coordinates I've shifted improperly?Thanks!sg (A:Autopilot heading lock dir,degrees) d (A:Plane heading degrees gyro,degrees) 90 + - dgrd


I7-7700k@4.7ghz | 32gb RAM | EVGA GTX1080 8gb | Mostly P3Dv5 (also IL2:BoX, DCS, XP11)

Share this post


Link to post
Share on other sites

Hi,Presuming the knob is 30 x 30 pix may be this works ok:Jan"Procul Negotiis"

Share this post


Link to post
Share on other sites

Thanks, Jan - I'll give that a try...


I7-7700k@4.7ghz | 32gb RAM | EVGA GTX1080 8gb | Mostly P3Dv5 (also IL2:BoX, DCS, XP11)

Share this post


Link to post
Share on other sites

Hi,If you want to use your own code try this: orJan"Procul Negotiis"

Share this post


Link to post
Share on other sites

Jan,Could you help me by explaining what the numbers are defining? For example, in the first example of previous message, the first Area (Left =0 Right=30 Top=0 Bottom=30) defines the whole bmp as an area - the default I'd imagine, so leaving it out in the second example does the same? Then AREA LEFT="15" and AREA RIGHT="15" - is it implicit in the LEFT and RIGHT which "15" are defined as the mouse spot?Thanks for entertaining my newbie questions!sg


I7-7700k@4.7ghz | 32gb RAM | EVGA GTX1080 8gb | Mostly P3Dv5 (also IL2:BoX, DCS, XP11)

Share this post


Link to post
Share on other sites

Also, (sorry!), because it's a rotating gauge in which I've defined the axis, the coordinates don't become relative to the axis, right - always relative to the bmp.?Thanks!sg


I7-7700k@4.7ghz | 32gb RAM | EVGA GTX1080 8gb | Mostly P3Dv5 (also IL2:BoX, DCS, XP11)

Share this post


Link to post
Share on other sites

Hi,You can define in a gauge the exact position of the clickspots by defining their left, right, top and bottom coordinates, x/y of pixel.When the bitmap of the gauge is exact that what you see on the panel, no transparant parts on top, left or right etc., then you can give the format of the gauge as clickspot, only defining the maesure, amount of pixels, of the left and right area (or top and bottom)See the examples above, all three.The axis of rotation has nothing to do with the clickspots.In your case, a rotating knob of 30 pix, it is quite logical to put the spot for decrease on the left and increase on the right of the axis, the middle, so 15 pix on each side.Hope it helpsJan"Procul Negotiis"

Share this post


Link to post
Share on other sites

>Hope it helpsIt sure does - thanks for you time and assistance!sg


I7-7700k@4.7ghz | 32gb RAM | EVGA GTX1080 8gb | Mostly P3Dv5 (also IL2:BoX, DCS, XP11)

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...