Flixel Forums

development => help => Topic started by: sheep42 on Sat, Feb 27, 2016

Title: [Flixel-GDX] Pointer Issues [RESOLVED]
Post by: sheep42 on Sat, Feb 27, 2016
Hi There,

I'm having some odd issues with the mouse pointer in my game and I'm hoping someone might be able to help me out.

When I have the game running in the default window things work perfectly, however when I resize or maximize the window the mouse pointer becomes offset. I am suspecting this might be something to do with LibGDX as it seems like the system pointer is also offset when I show it. When the button is hovered it will activate a hover state and turn the button white. I have temporarily shown the system pointer on top of the Flixel pointer for demonstration purposes.

Here's a screenshot of the window at it's starting size (working properly):

(http://dshedd.com/wp-content/uploads/2016/02/Screenshot-from-2016-02-27-190007.png)

Here's a screenshot of the maximized window(offset issue):

(http://dshedd.com/wp-content/uploads/2016/02/Screenshot-from-2016-02-27-190055.png)

As you can see in the attachments, when the window is maximized, the flixel pointer is drastically offset from the system pointer and neither pointer is triggering the hover state at the proper position. The same issue carries over mobile touch events. Any help would be greatly appreciated.

Thanks!
Title: Re: [Flixel-GDX] Pointer Issues [RESOLVED]
Post by: sheep42 on Sun, Mar 13, 2016
Was able to fix this by calling FlxG.mouse.load(); on window resize.