kaan Posted June 8, 2016 Share Posted June 8, 2016 Hi I'm wondering whether there is an intended way of replacing the cursor with an image using Pixi Some ideas I have: 1) Would be using CSS to replace the cursor, I also see discussions related to a .defaultCursor property from 2013 that changes the cursor for specific sprites, even without any Pixi features that I don't know of, cursor could be changed with CSS on hover in/out etc. 2) Would be hiding the cursor and drawing it manually One issue I'm facing on OSX, without any cursor modifications is a disappearing cursor, when I move around with WASD, the cursor disappears, what's bad is that this is not specific to Pixi or Gaming or the Browser, it happens everywhere, probably a system thing, so (2) seems like a good option - yet - if frames drop below 60 fps, it might give cancer to the player (Just came across this: http://stackoverflow.com/a/3899005/914546 - so (1) + (2) might be possible too) ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted June 8, 2016 Share Posted June 8, 2016 //this is by default - take it from parent //you can change that. renderer.plugins.interaction.defaultCursorStyle = 'inherit'; I dont know about pixi v3, but in v4 we definitely have it Quote Link to comment Share on other sites More sharing options...
kaan Posted June 23, 2016 Author Share Posted June 23, 2016 On 6/8/2016 at 8:59 PM, ivan.popelyshev said: //this is by default - take it from parent //you can change that. renderer.plugins.interaction.defaultCursorStyle = 'inherit'; I dont know about pixi v3, but in v4 we definitely have it Thanks for the suggestion One of your previous suggestions was to read the pixi code, indeed it's very readable sprite.interactive=true; sprite.buttonMode=true; sprite.defaultCursor="help"; Started using this right now, works great As for the disappearing cursors, I guess the best solution is to ignore the issue, I also switched the game to mouse movements instead of WASD (on OSX browsers, it probably should be all mouse or all keyboard, because the combination is extremely annoying, controller-wise speaking) ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.