Some widgets (such as InputField) need to know if they are selected or not. That is to know if they are the last widget on which the user clicked. To implement this a context manager would have to be made.
This could be implemented using containers although they would need to communicate between themselves. One way to fix this would be to implement another module-wide variable like PIGUI_DISPATCHER.
Otherwise a master container which would only contain other containers could be made. However this may reduce performances and improve code complexity, which isn't pythonic.
Some widgets (such as InputField) need to know if they are selected or not. That is to know if they are the last widget on which the user clicked. To implement this a context manager would have to be made. This could be implemented using containers although they would need to communicate between themselves. One way to fix this would be to implement another module-wide variable like PIGUI_DISPATCHER. Otherwise a master container which would only contain other containers could be made. However this may reduce performances and improve code complexity, which isn't pythonic.