Hi, I’m wondering if it is possible to make a button gui that is shaped differently from the default rectangle. For example if I were to make a triangle shaped button would that be possible?
A solution I have would be to cover half of it by another gui that is rotated 45 degrees, but that seems very inefficient, especially when it comes to more complicated shapes.
Thanks!
What I would do is use things like ImageLabels and ImageButtons and select a Triangle Image with a transparent background. If you look at the Plugin that makes your guis a round kind of rectangle, it uses image labels.
I probably should have rephrased that differently. The problem is that clickable area is still a square regardless of what image you have. So while it looks like a triangle, if you click outside of it the button still registers with scripts.
Have you tried using a ImageButton then?
Edit: Ohh hmm so you mean like even with an image button its still square?
Ye it’s so frustrating (30 chars)
You might just need to size down the button its self. I’ve seen things like this on other games too though I’m not a UI Designer but I have some experience in it.
Make a separate shape that doesn’t have the square in the middle and then copy the script and paste it into both buttons.
Im not sure if you found a solution by now, but I have one but it may be somewhat unoptimized.
for any shape you can use multiple transparent frames parented inside each other that have the ‘ClipDescendants’ property enabled. The last descendant would then be the button, frame, or whatever UI object you need in it’s normal form.
I haven’t tested this out yet so this solution might not work.