Not sure why this event isnt changing the texture? widget to widget button.

Hey,

I feel this should work But I cant get it to change.

The event construct works in widget B (Its disconnected as I was testing some stuff)

the widget A button Does fire the print string in widget B.

But it just bypasses the border texture process.

Not really sure where to start with it.

Thanks.

Sigh after many iterations, Still cant get it to function.

Ive tried running a dispatcher but it seems overkill. Ive tried direct.

Not sure where to go with it.

How’s this for the border:

1 Like

Im not sure I follow.
So Itd need to bind the set of images based on button prompts.

I think I just fundementally dont understand widget to widget communication. Ive watched loads of vids but they Always use actors or third person refs. which Im not using either of in game.


First one is a blitz attempt before work to see if I could scrub it together, It didnt work but I think its because Im not calling an event to repeat the bind. So it defaults area Number to 0 and shows that image.


The second is an attempt at creating a new function instead and calling the function fresh everytime to impose the select change but again it didnt work.

Im 100% Not understanding what Im doing here. :thinking: :sob: :thinking:.

Im gunna fire off a bunch of tutorials in my gaps at work and fingers crossed.

If you have any ideas, It would be an unbelievable help

Thanks for reading.

Nah, I am merely asking if you’ve accidentally bound a function, which would override whatever else is happening to the brush. Do you have something bound there, as in my pic above? Be mindful of bindings, they execute every frame, non-stop.

This would create 60 new widgets every second, you probably do not want that…


This seems fine:

The real question is what else is going on with you widgets. For example, you create a widget above but I can’t see you add it to the viewport or another container… Does it happen later on, where we cannot see in the attached pics?

1 Like

Phew, Long day.

:laughing: woops my bad, sorry No there wasnt anything binded for it.
Really, welp Ive already learnt something.
Ah I see, I thought I was creating a reference of sorts, So only area number would be pulled from it rather than invisibly creating a widget, Thats good to know, Ive used that style of reference incorrectly a few times.

Ok I think Im starting to catch onto the issue Im having.

I have a grid layout thats cut into 4, I placed promoted refences to them for something else but kept them incase which might be the key.

Which I think all of this means is that when I create a widget to reference something, Im actually referencing a different new “version” of the widget. A second widget is made.

For example here

Im not actually referencing the widget I created at the start. Its creating a new widget and referencing that.

Which makes sense as Invisibly it probably was doing it to the widget that isnt childed or viewported But not to the one originally made, Which is what sent me on a goose chase, as it was printing but of course it would. it does technically exist, Just not visibly.

What I need to do is somehow reference the original widget made an added to the child. Using those variables I made right at the beginning.

Absolute epiphany.

Now just figuring out this next stage of how to reference

Hopefully I Understood the issue well and I explain myself well.
Thank you for helping me, Its a huge help.

The phrasing of the widget creating 60 times a second really jingled my brain around In the correct manner on how this all functions.

In the morning, Im going to have a crack at figuring out how to reference this correctly.

Thank you :trophy: :trophy:

So we have new 4 widgets added to another widget’s canvas. In the last pic, who do those 2 buttons belong to? Is Map Layout the widget where you dynamically add those other widgets to? It’s confusing a bit as you also seem to have a Canvas Panel called Map Layout?

Or am I misunderstanding something?

1 Like

This is really weird. I tried recreating this and it works perfectly.

One question though, where is your Add To Viewport node? After the Create Widget I had to put the Add To Viewport node for it to even show up.

where is your Add To Viewport node?

yeah this was my error I think. I thought I was referencing it like casting. but I was creating a second widget and referencing that.

Its created elsewhere earlier.

originally I had one super larger widget that handled everything, like the entire game.
So I got some help to look into grids/named slots etc.

currently how everything is handled is

\One master widget that holds only the handling of placement on the canvas.
its 4 borders with 4 widgets added as children. there is no viewport node.

the 4 widgets individually handle their own situations now.

The second widget is the Maplayout, Controls where the charecter is and you can move around The map using buttons that are overlayed over their position on the map.

When a button is pushed in Maplayout widget. It makes changes to the area layout and choices layout widgets to represent what is there and the choices you have.

So for example. When a button is pushed in map layout, area layout changes image.

I think the problem is how to get map layout to communicate with area/chocies layout directly. Maybe its casting :thinking:

I have absolutly no idea if this is the correct way to go about this.

But this works beautifully. Grabbed all widgets from userinterface, Get and then pulled the area reference from there.

Tbh I dont exactly Know why in Get, 0 index is correct? But it works. Im assuming its kind of placing all the widget references into the same index and you can individualize them if you wanted too.

Itd adore some opinions in weither Im actually just backing myself into another corner but Ill roll with this for the morning and change it later if Ive checkmated myself.

Thanks for taking the time everyone :trophy: champions!

First of all, perhaps there is no need to create the widgets dynamically with create->variable->add to panel; since you’re working with user widgets, you can add them by hand to another panel. This way they’re always there and they’re already referenced and parented.

image

Ignore this if it makes no sense in your case, you may have a good reason to create widgets dynamically, ofc.


Event Dispatchers are made for this and you do not need to create or store additional references, but you may - perhaps they’re needed for something else.

I have 3 widgets in total:

  • Area Layout with a custom event:

image

  • Map Layout with a button

  • another widget that creates them and binds them (buttons have built-in Event Dispatchers ):


Were you to add user widgets in the Designer (as in my original note) rather than create them dynamically with blueprint script, the whole thing could be dramatically simplified and feel more natural:

Do note - one can create custom Event Dispatchers, so a button press can send actual data - the image for the Area Layout mayhap?

1 Like

This is not the way.

1 Like

And lastly, creating User Widgets, adding them to another widget and equipping them with Event Dispatchers really opens up and simplifies the comms:

Essentially, you can also use the master widget that holds user widgets as glue - and pass the data from one user widget to another. It’s just another option.

1 Like

Holy geez, I cant thank you enough.

Thats golden knowledge. Works beautifully and makes perfect sense.
It opens up alot of communication options, Ive been reading and going back over it for what must be an hour or more lol.

Thank you for putting in the time to throughly explain this, to beginners like myself it makes an absolute world of difference. :trophy: :trophy: I can go to work smiling lol.

the community is outstanding here, Im excited to learn more and start giving back myself eventually.

1 Like