Page 1 of 1

Problem with GetLayerAtPos()

Posted: Fri Dec 28, 2012 7:09 pm
by Allanon
Hello Andreas,
I'm wrinting a program that uses layers and I've added the possibility to resize the whole application using the #SCALEMODE_LAYER flag.
I've a problem when I used a scaled screen, let's say that I run my app on native res of 1366x768 and all is working fine but if I run it at the scaled resolution of 800x600 (for example) using ScaleWidth & ScaleHeight parameters the function GetLayerAtPos() seems to fail...

I mean, in the 800x600 scaled screen, MouseX() and MouseY() correctly returns the native resolution coordinates range (0-1366, 0-768) but GetLayerAtPos() does returns wrong results using

GetLayerAtPos(MouseX(), MouseY())

Should I scale the mouse coordinates manually or GetLayerAtPos() should care of the scaled screen coordinate system or there is a bug?

Re: Problem with GetLayerAtPos()

Posted: Sun Dec 30, 2012 11:17 pm
by airsoftsoftwair
No, that's clearly a bug. GetLayerAtPos() should take care of handling layerscaling automatically. It's fixed now. Thanks for the report!