- Edited
Hello,
I am currently making a card game and in this project I try to keep the code as clean and well-written as possible, prefarably with no dependencies whatsoever. And now my question, maybe about how you manage your projects in general:
How would you handle the user interface? Should all the methods for it be kept in a seperate, specialized node or every node should be responsible for its own elements of the UI (I'm talking about displaying tooltips for example)? How would other nodes access the UI-responsible one without dependency?
EDIT: I also found a maybe more important issue: What to do when I need to collect the input from UI? Example: an action makes buttons apear and I need to know which one the player chose. This is especially hard for me to write in a non-dependent manner.
To be precise, I know "a way" to do all of that, but I'm specifically asking about how to write code in GDScript that fully follows SOLID principles.