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.

Categories

+8 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 (1 point)

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 (1 point)
+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 (1 point)
+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 (1 point)
+3 votes

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

answered by (1 point)
...