Each button of the widget A has the face of the characters I can play with (it is a crew of 3 characters and I can switch from one to another)
I have a widget B, with many buttons.
Each button of widget B has the face of characters that I can select to be part of the playable crew that is shown on widget A. (So playable character indicated on widget A depend on the one selected from widget B)
Therefore, after I quit the widget B, the 3 buttons on widget A should be updated to show the faces of the character selected to be part of the crew, thanks to widget B.
The problem:
It is the last step. Right now, after selecting on widget B the characters to be part of my crew, the pictures do not update.
As an example : I first played with characters 1, 2 and 3. Then I wanted to change the crew, so I opened widget B, replaced everyone by characters 4, 5 and 6. But when I close widget B, the pictures still show the faces of character 1, 2 and 3 instead of 4, 5 and 6.
Does anyone have a solution to update the pictures (including the style for normal, hovered and pressed) ?
you need to get a reference to widget A, then get a reference to the image slots. im assuming you make widget B inside widget A, so you should be able to get a reference to widget A really easily if thats the case.
update those 3 from the corresponding pictures in your Widget B. its probably a good idea to update them at the same time as you update widget B.
if you are still confused, i can remake your setup, but its a bit of a pain and pollutes my current project with widgets ill have to delete after.
I think I have already tried this, but it did not really work as I wanted, as it was not automatically updating the pictures.
What I had if I remember correclty was:
Buttons from widget B were setting variables in widget B
Buttons pictures of widget A were linked to the variables from widget B. (Lot of branch with condition like "variable = … / true then / false then. And each brench was setting pictures)
My problem is that the event defining and updating the pictures was not running automatically. But I know it was working as I used a keyboard event to run it manually and it was updating the pictures.
Any idea on how to run it automatically ?
I was thinking at some point that the best way would be that when I click on a button from widget B it called the uptaded event from widget A, but I did not succeed