I thought I would give a little more Information.
The game is going to be an RTS, and the menu I am trying to create is the build menu.
So far I have created three Widgets for this. A custom function we created delivers us a Kismet Array with all necessary information about all our building blueprints.
The first Widget creates a Button for every Category, and add them into a Horizontal Box. These are going to function like tabs.
The second widget is filled with Buttons for every Building of that Category, and order them according to Type,
The third Widget is our main HUD, and it creates an instances of the Category Widget, as well as one Building Widget for every Category on Construction.
This is how far the stuff is implemented and working.
Now for the stuff that I do not know how to do:
I want to bind the Category Buttons so that they hide all Building Widgets aside from the one that corresponds to their category.
To do this I need to create an event for every Category Button, bind that event to the right button, and make it execute a function.
Also I want every Building Button to initiate building that Building, when clicked.
Similarly to the Category Buttons, I need to create an event for every Building Button, and bind that to the right function.
The problem I am confronted with is that I cannot bind the OnClicked event of a button that is not yet created,
and I cannot connect my function with an Event that is not yet created.
Also the function needs an input to recognize which Button executes it, or which are its targets.
The “Create Event”-Node does not seem to be what I am looking for sadly,
and neither is an event Dispatcher. At least as far as I have understood the Unreal Documentation.
I can use the Create Event Node to fill an array, but I cannot declare that array as a variable, and I cannot add this array to a map that I can declare a variable.