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?
Problem with GetLayerAtPos()
Problem with GetLayerAtPos()
----------------------------
[Allanon] Fabio Falcucci | GitHub (leaving) | Gitea (my new house) | My Patreon page | ☆★ All my links ★☆
[Allanon] Fabio Falcucci | GitHub (leaving) | Gitea (my new house) | My Patreon page | ☆★ All my links ★☆
- airsoftsoftwair
- Posts: 5871
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Problem with GetLayerAtPos()
No, that's clearly a bug. GetLayerAtPos() should take care of handling layerscaling automatically. It's fixed now. Thanks for the report!