computern Posted July 23, 2018 Share Posted July 23, 2018 Can't find any inbuilt way to have the cursor change to a pointer when the user is hovering over a GUI element. Meshes seem to have this support using the eventManger and scene.hoverCursor but I cant find anyway for the GUI elements to. Just seems logical to me that if the user is hovering over a GUI Button the cursor should change. Docs simple Button Demo: https://www.babylonjs-playground.com/#XCPP9Y#4 Currently my plan is just to have my own hover variable and do this which works this.scene.registerAfterRender( () => { this.view.canvas.style.cursor = "pointer"; }); Quote Link to comment Share on other sites More sharing options...
brianzinn Posted July 23, 2018 Share Posted July 23, 2018 here is an example: https://www.babylonjs-playground.com/#XCPP9Y#578 you may want to capture the current cursor and switch to that onPointerOut - depending on what you are doing. edit: Scroll down to "General Properties" https://doc.babylonjs.com/how_to/gui Quote Link to comment Share on other sites More sharing options...
Dad72 Posted July 23, 2018 Share Posted July 23, 2018 Maybe this could be done by default in the GUI engine, because if we have to do this on all our button or link, it's very repetitive. Quote Link to comment Share on other sites More sharing options...
Guest Posted July 23, 2018 Share Posted July 23, 2018 I'm ok to add it if someone wants to create an issue to track it (i'm not really available this week but I want to keep track of good idea :)) 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.