Mouse cursor from sprite not showing up in node-webkit.

0 favourites
  • 5 posts
From the Asset Store
Cursor Magic
$2 USD
80% off
Mouse cursor is something that the player controls and sees all the time, that's why it is so important to make it cool!
  • If I move the mouse out of the node-webkit game window, I lose my custom mouse cursor.

    Sometimes I get it back, sometimes I don't. Sometimes I don't even get a regular mouse cursor, I just get a sideways resize cursor.

    You'd think that just clicking in the game area would get it back, but no. That'd be too easy.

    The problem is inconsistent and does it whenever it wants.

    Now, if I extend the borders of the node-webkit window so it creates a letterbox around the game, I get my mouse cursor back, but ONLY if the cursor goes over the black area of the letterbox.

    This does not seem to be specific to my game. I started a blank game and set the mouse cursor to custom, and it still behaves the same. Most of the time, I get the standard Windows mouse cursor or even the stupid resize handle cursor.

    I even tried setting it to every tick set mouse cursor to custom sprite, but no.

    I don't know if this is a new problem or not. I've been using Chrome most of the time and just recently started using Node-webkit to preview. It does the same on export. I'm using the latest beta release, but like I said I didn't test it with the last couple of releases, so who knows if it's new or not.

    The only thing I can do to get my custom cursor back is to activate something in game that triggers a different cursor such as "cursor over enemy, set to sword sprite", other than something like that, I can't get it back.

    Unless there is something I don't understand about setting a mouse cursor from sprite, then I don't know how to fix this. Like I said, it is specific to node-webkit which I what I want to use when I release my game. Even in Chrome and resizing Chrome so my cursor can leave the screen, it comes back just fine. I'm using Win 7 if it matters.

  • Am I really the only one having this problem? I updated my graphics drivers, and it didn't seem to matter.

    Like I said, this problem exists in new projects as well, so there is nothing I can do event-wise.

    If I could just add a one pixel border around my game, it would work because crossing over the black letter box area always brings my custom cursor back. But I see no way to modify the node-webkit.

  • Would probably help if you followed the bug reporting guidelines and supplied a minimal .capx with exact steps that you use.

  • I didn't post a capx because there's really nothing to it. I just made a blank project and tried setting the mouse cursor from sprite on start of layout and even to further make sure, it also sets it every tick. I have a variety of ways I set the cursor in my actual game depending on the actions of the character, but I can't even make it work with a simple project anymore.

    Here is a capx.

    Edit: I have also noticed that once I lose my custom cursor, if I right click in the game, I get my custom cursor back. No idea why.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Looks like a node-webkit bug. Reported here: https://github.com/rogerwang/node-webkit/issues/2250

    Closing since the issue will now be dealt with on the node-webkit tracker.

    Please always follow the bug report guidelines without exception. This post would have been closed without investigation if you had not followed up with the .capx that demonstrates the problem.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)