Jump to content

Grab cursor style


Recommended Posts

Hi im new at Phaser, and im trying to change the style of the cursor to the grab hand. I know you can use the hand cursor with useHandCursor, but i was wondering if there is a way to set a grabbing hand.

on my game i have a draggable background, So the cursor style at first is the hand and when input is down i want to change to grab and u can drag through the background.

   mainLevel.content.className += ' grabbingCursor';
    mainLevel.content.className += ' grabbingCursor';

i try this and is not working. On mainlevel.content i have a reference of the canvas, and this is the css of those classes


     cursor: -webkit-grab;

        cursor: -webkit-grabbing;

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...