This doesn't have to be Godot specific if you know of examples, I've done a bit of research and there are some quite varied methods on how to do it, the most straightforward way I can think of is maybe doing it connect the dots style and having a list of colliders you have your mouse go through with the mouse held down or something then when you get the correct symbol or whatnot drawn you can cast a spell. There are apparently way more accurate methods than this though using image recognition but I'm not very familiar with them.
For those who don't know what I'm talking about.