If you have a GUI application that fully works on a 2D drawing, what should be the best practice for handling what to draw and where to touch?
An example of a better understanding:
I have a game with a map. On this map I can build houses and more.
I also have a dashboard that can be expanded. On the advanced bar, I draw some information about the game, and also offers an interface for changing different values. If a touch occurs, I have to check if the information panel is expanded or not to determine if I want to change something on the map or something on the panel.
This is done using a state template, but I doubt it is correct, because I think it can be a little complicated due to possible βsub-statesβ.
So basically the question is: is the state template (from GoF) the best practice for handling a clean GUI?
source share