I have been looking for a possibly difficult answer to a simple question. I would like to be able to highlight paths on a TikZ picture. I would like to highlight these paths by clicking on them and at each step retain the previous steps.
For instance, in the MWE below, I would like to start with the 4 empty squares, and have the color appear on each of them by clicking on it. And considering that any path can be chosen. I guess I can do it by using {hyperref} and identify all the possible ways, but there must be some easier way I am sure.
Any idea?

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning}
\tikzset{box1/.style={draw=black, thick, rectangle,rounded corners, minimum height=2cm, minimum width=2cm}}
\begin{document}
\begin{tikzpicture}
\node[box1, fill=white] (c1) {1};
\node[box1, fill=white, right=1cm of c1] (c2) {2};
\node[box1, fill=white, below=1cm of c2] (c3) {3};
\node[box1, fill=white, left=1cm of c3] (c3) {4};
\node[box1, fill=red, right=5cm of c1] (c21) {1};
\node[box1, fill=blue, right=1cm of c21] (c22) {2};
\node[box1, fill=orange, below=1cm of c22] (c23) {3};
\node[box1, fill=green, left=1cm of c23] (c23) {4};
\end{tikzpicture}
\end{document}