Jump to content

Circle Button HomeBrew Module


DylanD
 Share

Recommended Posts

Hi there everyone,

I am trying to make a new circle button module(in BABYLON.GUI), it would work exactly like a regular button but in the shape of a circle.  I have a prototype here which makes the button look like a circle but I can still click outside the circle to activate the button.

I was wondering how can I change that so you can  only activate the button by clicking inside the circle.

I don't fully understand why this doesn't work since I took out the rectangle portion of the button.

Any ideas?

 

Link to comment
Share on other sites

5 minutes ago, Deltakosh said:

Really approximate but you get the idea: https://www.babylonjs-playground.com/#EJX0YB#1

(from #40 to #44)

wow this is great!  I don't really understand it very well, but this is great.

So how I think it works is centre get the square that used to be the pick area, then I'm lost.  I think current is the mouse pointer coordinates...

 

Thanks though DK!

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