How the hell do I make a circle button(shape)

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By João Vitor
:warning: Old Version Published before Godot 3 was released.

I want to create a button or sprite with the background color red and with rounded corners(circle)

:bust_in_silhouette: Reply From: Zylann

You can draw your circular button in a painting program, then use a TextureButton to apply the image on it. TextureButton — Godot Engine (stable) documentation in English

:bust_in_silhouette: Reply From: GhostBall338

The first thing I did, was create a polygon2D, create a circle with it. If you want to create the actual button, then I would go on paint, and I would use the circle tool to make a red, or whatever color you want it to be, and fill it in with that color. Next, you could select it, and copy it on to a piece of paper on word, and put that image into your godot folder. Now you can insert your red button into the polygon2D section, and wala, you got your self a noob way to make a button!

:bust_in_silhouette: Reply From: iscamer

You can create a button and add a StyleBoxFlat within the Custom Styles panel:

Then adjust the Corner Radius properties:

Corner radius

You can also do it from a script.

More info here: StyleBoxFlat — Godot Engine (3.0) documentation in English