Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.


+6 votes

I'm currently using a _draw function to highlight something temporarily. Once I'm done needing the highlight, I can't find a way to undraw it. Any solutions or alternatives are appreciated.

asked in CSC380Jan2024 by (2.4k points)

4 Answers

+5 votes

queue_free won't work to my knowledge because draw is a function not an object. also I looked it up and couldn't find much but maybe doing queue_redraw with nothing might undo it. not sure though

answered by (3.8k points)
+4 votes

Have you tried making a timer and then when it times out it sends a signal to the possible script with draw to then try queue.free()? That could possibly help.

answered by (2k points)
+3 votes

You can establish a flag to indicate the removal of the highlight and utilize queue_redraw() to trigger a redraw that excludes the highlight.

answered by (2.1k points)
+3 votes

I used queue_redraw() and it deleted what I was drawing... you might wanna give it a shot

answered by (3k points)