GUI cursor doesn't move as much as expected

#1

I was trying to create a GUI but gui.pick_node() wasn’t returning true even though I’d got the cursor I’d implemented over the button. I tried a few things and found that I got a hit when the cursor was to the left of the button. Since my GUI was rather small (240 x 240) and I was running the game in fullscreen, I thought the problem might be to do with stretching the content to fill the screen.

I created a second, minimal, project containing a game cursor and a GUI cursor, which both display on the same screen, and have their position set in the same way. I found that the the game cursor stretched and moved as expected, but the GUI cursor remained the same size and didn’t move around as much. I’m guessing the GUI cursor shouldn’t stretch, but should keep in step with the movement of the game cursor.

The minimal project can be found on GitHub at https://github.com/halfheart-games/CursorDivergence

When the screen isn’t maximised, I see this:
Screenshot_2020-10-15_16-03-04

When the screen is maximised, and I move the cursor to the right, I see this:
Screenshot_2020-10-15_16-02-37

Defold version 1.2.174
OS: Manjaro Linux
Desktop: Xfce 4.14.2

Is there some way of getting a GUI cursor to work, or is it a bug? Just let me know if any more information is needed.

0 Likes