Author Topic: [Flixel-GDX] Pointer Issues [RESOLVED]  (Read 1548 times)

sheep42

  • Member
  • **
  • Posts: 12
  • Karma: +0/-0
    • View Profile
[Flixel-GDX] Pointer Issues [RESOLVED]
« 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):



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



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!
« Last Edit: Sun, Mar 13, 2016 by sheep42 »

sheep42

  • Member
  • **
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: [Flixel-GDX] Pointer Issues [RESOLVED]
« Reply #1 on: Sun, Mar 13, 2016 »
Was able to fix this by calling FlxG.mouse.load(); on window resize.