[SOLVED] Custom Cursors and Window Scaling
Posted: Thu Aug 17, 2017 10:23 pm
Hello,
Recently, I've been having an issue with custom cursors and love.graphics.scale. I have a custom pointer that, while the scale is set to 1, the image of the pointer and the actual cursor (hidden) match up fine. However, when I scale the window and all of the graphics using love.graphics.scale, the custom pointer image gets bigger as it should, but it no longer matches up with the real cursor's position. It ends up jumping off-screen, and I have to move the real cursor to get the custom cursor back on-screen. I also noticed that the bigger the window scale gets, the faster the custom pointer moves. The one upside to this is that the custom cursor still snaps to the 1 pixel grid. I tried scaling the cursor separately, and while I was able to get the two to match up again, the custom cursor moved independently of the pixel grid. How can I get them to match up AND stick within the 1 pixel grid?
Sorry I dragged this out so long, hopefully I didn't waste too much of your time
Recently, I've been having an issue with custom cursors and love.graphics.scale. I have a custom pointer that, while the scale is set to 1, the image of the pointer and the actual cursor (hidden) match up fine. However, when I scale the window and all of the graphics using love.graphics.scale, the custom pointer image gets bigger as it should, but it no longer matches up with the real cursor's position. It ends up jumping off-screen, and I have to move the real cursor to get the custom cursor back on-screen. I also noticed that the bigger the window scale gets, the faster the custom pointer moves. The one upside to this is that the custom cursor still snaps to the 1 pixel grid. I tried scaling the cursor separately, and while I was able to get the two to match up again, the custom cursor moved independently of the pixel grid. How can I get them to match up AND stick within the 1 pixel grid?
Sorry I dragged this out so long, hopefully I didn't waste too much of your time