Oh you are bit more advanced, so what i do with widgets:
- i do blueprint interface with single event: “EVENT_SetMyOwner”, it gives widget reference to whoever keeps it, and sets construction values. For eg having custom button widget and SetMyOwner sets pointer to whoever knows/spawns those button widgets, and sets text for button name.
- i use GamePlayTag with all widgets. For eg, for widget state changes, like Button.Pressed, Button.Released etc. Also for telling buttons what they are, like button.ExitGame, button.Applysettings etc.
- then having all those GamePlayTags, i create function library, and then some helping functions: like GetButtongName from ButtonTag. etc.
- then for updating anything in hud/widget i create dispatcher in main place, that triggers update or something changed. It has GamePlayTag like Changes.HP Changes.Mana etc. When thet dispatcher fires every widget checks if tag matches what it should track, then pulls info.