I tried to set_process_input(true/false)
but I was still getting the error whenever I hover the mouse over the screen.
I didn't yet change the CanvasLayer node, but what helped for now is that I've put this code in my TouchScreenButton.gd
:
func _unhandled_input(event):
if !enabled:
return
#my input check here
and I set my enabled
variable when changing the menu (hiding one menu will 'disable' all it's buttons).
This causes the old error to popup only when changing the menu, and only once for each button in new menu.
Considering the scenario I had up until now, this is great. I'll get back at you when I decide to try to change the CanvasLayer for something else and see if it works.
Thank you very much for helping me!