0 votes

I want to use the drawing-methods, (drawline(), drawcircle(), etc) , while I'm responding to mouse-events (hover, pressed, released, etc.)
a.t.m. I put all the drawing commands and parameters in 2 on-frame-alternating arrays, and let _draw() read these arrays and execute the functions.
It works, but I'm not sure if it works under all circumstances.
What would be a proper way to do this?
Thanks ahead!

in Engine by (50 points)

1 Answer

0 votes

yeah, after rigoureos testing; errors creeped in.
Since draw() and onmousevent are asychronous, I'll revert to a single queue, and push on the mouse side and pop on the draw side.
Still seems a bit surplus though

by (50 points)
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 webmaster@godotengine.org with your username.