The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

0 votes

Doing this just draws one circle and everyhing else disappears.

extends Control

var array = ["7b5454","7f4444","402828","6e4040","603e3e","7d4242","644242","623d3d","6f3737"]

func _draw():
    for color in array:
        var myToolButton =
        myToolButton.align = 2
        myToolButton.text = "#" + color
        myToolButton.size_flags_vertical = 1
        myToolButton.rect_min_size = Vector2(125,50)
        draw_circle(Vector2(myToolButton.rect_position) + Vector2(30/2, 30/2), 30, color)

What do I have to do?

in Engine by (382 points)

I noticed, it has to do something with the shader I have put on two Sprites in this scene. It is by GDQuest

1 Answer

0 votes

they are probably overlapping?

extends Control

var array = ["7b5454","7f4444","402828","6e4040","603e3e","7d4242","644242","623d3d","6f3737"]

func draw():
| var Pos := Vector2.ZERO
| for color in array:
| | var myToolButton =
| | myToolButton.align = 2
| | myToolButton.text = "#" + color
| | myToolButton.size
flagsvertical = 1
| | myToolButton.rect
minsize = Vector2(125,50)
| | Pos += Vector2(40, 0)
| | #$VBoxContainer.add
| | draw_circle(Pos, 30, color)

by (410 points)

Now I have all circles, nevertheless everything else which could be seen in the scene is away.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.