s0lst1ce / pigUI

A WIP Pygame GUI toolkit.
https://discord.gg/mpGM5cg
GNU General Public License v3.0
3 stars 0 forks source link

Selection #14

Open s0lst1ce opened 5 years ago

s0lst1ce commented 5 years ago

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.

s0lst1ce commented 5 years ago

A global variable is currently being used. More extensive testing needs to be done before the efficiency of this method can be asserted.