I am developing game in C++ where you construct your own village - copy of MC mod MineColonies. Currently I am working on the system of hiring villagers to workplaces. I have a system which has references to all villagers and workplaces. I already made the Widgets for the UI, the problem comes when i try to pass the information back to the system. Now the problem is that for the UI i have to pass references to the widgets and the widgets have to save that reference, so when the hire button is clicked they can tell the system with villager is hired where. Is it problem to have widgets keeping references or i can do it that way. I want i to work like this MineColonies - How To Get Started: Modded Minecraft - YouTube.