Jekteir
14-05-2008 01:44:54
Hiya,
I noticed that buttons were not being highlighted accurately when the tip of the pointer was over them. As you know, the button ought to have its 'over' texture on from when the very point of the cursor enters its lower bounds, to when that same point leaves the top. The point that's first in and first out should trigger the changes.
This wasn't happening for me -- the texture was changing when the cursor was about halfway onto the button already.
Cause:
Just comment the code in MouseCursor::getPosition() as I have done above, and replace it with the uncommented line I added. Calculating the mean centre of the cursor, as you had done above, is not appropriate for cursors, whose tip should always be at the top left, very top of the texture.
Could you add the fix to SVN please? I've long since lost my commit rights!
Thanks,
Jek
I noticed that buttons were not being highlighted accurately when the tip of the pointer was over them. As you know, the button ought to have its 'over' texture on from when the very point of the cursor enters its lower bounds, to when that same point leaves the top. The point that's first in and first out should trigger the changes.
This wasn't happening for me -- the texture was changing when the cursor was about halfway onto the button already.
Cause:
Point MouseCursor::getPosition()
{
//return Point(mPixelPosition.x + (mPixelSize.width/2.0),mPixelPosition.y + (mPixelSize.height/2.0));
return Point(mPixelPosition.x,mPixelPosition.y);
}
Just comment the code in MouseCursor::getPosition() as I have done above, and replace it with the uncommented line I added. Calculating the mean centre of the cursor, as you had done above, is not appropriate for cursors, whose tip should always be at the top left, very top of the texture.
Could you add the fix to SVN please? I've long since lost my commit rights!
Thanks,
Jek