DylanD Posted August 2, 2018 Share Posted August 2, 2018 Hey everyone, I was wondering if there was a way to change the shape of the ImageOnly button and SimpleButton, to make it a circle instead of a square. I would also like it to work on any screen size so I cannot just do this(this is not even a perfect circle): https://www.babylonjs-playground.com/#XCPP9Y#587 Here is a image only button we can start off: https://www.babylonjs-playground.com/#XCPP9Y#28 Any ideas how I could do that? Quote Link to comment Share on other sites More sharing options...
DylanD Posted August 2, 2018 Author Share Posted August 2, 2018 This is the closest I have found to what I want, but I would rather just changes how my buttons already are than adding a new Image for it or something http://www.babylonjs-playground.com/#WWBIKZ This is also a thing, not exactly what I meant(its also not done) but its a start right? https://github.com/BabylonJS/Babylon.js/issues/3897 Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted August 2, 2018 Share Posted August 2, 2018 Using cornerRadius, you can get close http://www.babylonjs-playground.com/#WWBIKZ#8. Strange why giving same dim for height & width do not give a square though. If this could finallized, perhaps a CircleButton class could be made. Quote Link to comment Share on other sites More sharing options...
DylanD Posted August 2, 2018 Author Share Posted August 2, 2018 36 minutes ago, JCPalmer said: Using cornerRadius, you can get close http://www.babylonjs-playground.com/#WWBIKZ#8. Strange why giving same dim for height & width do not give a square though. If this could finallized, perhaps a CircleButton class could be made. Yea I had corner radius in my original post. Im thinking of making a circle button class myself. 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.