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

Share this post


Link to post
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 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

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

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

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