June 23, 2017, 03:32:23 AM

Author Topic: HaxeUI + HaxePunk  (Read 262 times)

infidel

  • Newbie
  • *
  • Posts: 9
    • View Profile
HaxeUI + HaxePunk
« on: March 22, 2017, 03:19:21 PM »
Hey, everyone.

I've tried to use HaxeUI v2 with HaxePunk and while the widgets are displayed, it looks like none of the mouse events register, clicks, mouse overs, etc. Is there a way to fix this? Another thing is my mouse cursor entity is displayed under the GUI elements (and under the OpenFL windows I've created). Can mouse cursor be displayed on top of everything or I would have to use OpenFL sprite for that?

bendmorris

  • Global Moderator
  • Jr. Member
  • *****
  • Posts: 84
    • View Profile
Re: HaxeUI + HaxePunk
« Reply #1 on: March 25, 2017, 04:56:07 PM »
If you're using a custom cursor in HaxePunk, there's no way to put that above HaxeUI - you'd need a separate OpenFL Sprite.

infidel

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: HaxeUI + HaxePunk
« Reply #2 on: March 28, 2017, 02:44:56 PM »
All right, I've set up a clean application and it worked there. So after some poking around I've isolated the problem - I create a GUI OpenFL TextField that is the size of the window, add it to the Sprite background and then hide it setting "visible=false". Apparently even if the text field is not visible because its parent is hidden, it still catches all of the mouse events. Hiding the field itself, too, solves this problem.