Jump to content

GUI Button, Change Shape


DylanD
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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.

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.

Guest
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.

Loading...
 Share

  • Recently Browsing   0 members

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