maegz Posted April 13, 2017 Share Posted April 13, 2017 Hey all! I've been looking around for quite a while now... I am trying to be helpful with a project with some minor issues, and that project includes the new world of Pixi (fantastic stuff I must say!). Now to the problem: We need an "ew-resize"-cursor, and it worked with defaultCursor before, but since that's now deprecated it seems impossible to make it work??? Only the default or pointer cursor is possible... If I don't make any sense, please do tell me. And if I make some sense, help would be much appreciated! Cheers, maegz. this.interactive = true; this.cursor = "ew-resize"; // Does not work!!! Quote Link to comment Share on other sites More sharing options...
Taz Posted April 15, 2017 Share Posted April 15, 2017 You can add the cursor to the InteractionManager's cursorStyles dictionary like this: app.renderer.plugins.interaction.cursorStyles["ew-resize"] = "ew-resize"; this.interactive = true; this.cursor = "ew-resize"; // Works now! Here's a working Code Pen that sets the sprite's cursor to "ew-resize": Disclaimer: I got this approach from reading the source and docs for InteractionManager and trying it out in the Code Pen. So it may not be the official/best way to do it. And I only tested for the latest Pixi version 4.5.0 OSUblake 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.