# 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

##### Share on other sites
 Help AVSIM continue to serve you!Please donate today!

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

##### Share on other sites

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

##### Share on other sites

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

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

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

##### 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 on other sites

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

## Create an account

Register a new account

• Tom Allensworth,
Founder of AVSIM Online

• ### Hot Spots

• 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!