How to make an uncolored square in godot?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By trien

Hello i want to make an uncolored squre which means a square without color in it

You mean a white square? Grey square? Black square? Transparent square? Or you mean you have a texture already but you want an effect that makes it draw with only grey scales?

Zylann | 2022-04-04 12:56

No i meant like a frame

trien | 2022-04-04 13:09

:bust_in_silhouette: Reply From: Ninfur

If you want an unfilled square with an outline there are a couple of ways I can think of.

  1. Use the ReferenceRect node with the property “Editor Only” set to false. I don’t think this is the intended usage of the node, but it’s one simple way of achieving a unfilled rect.
    enter image description here
  2. Create an image looking the way you want in an external editor like gimp or photoshop, e.g. enter image description here Then import it and use with either the TextureRect node or, if you need stretching, the NinePatchRect node enter image description here
  3. You could create a script that overrides the draw function of the ColorRect node for example. Something similar to what is done in the answer of this question.

Bro thx you saved me

trien | 2022-04-04 16:07