Hi all,
Beginner at using UE and probably having poor code thinking. I am trying to make a simple tab debug menu via a WidgetSwitcher without having to have a unique event for each button press or looping through arrays. I would like to have something that can trigger “when any button is pressed” to get the pressed buttons index/an assigned ID variable and then use that to set the active index of the WidgetSwitcher and make changes to the active button like background, border and that sort of thing.
Most of what I can see online seems to focus on setting up an event with a hard coded index per button or a bind targeting each button both of which seem wasteful and sloppy if you are going to have 20+ tabs just switching between vertical boxes. I am using a custom button Widget (variable text + ID) that has an On Clicked Event.
I tried adding variable-Parameter of the Object type to the Call On Tab Selected which gives me the output I want when targeting the bind on Tab 1, 2, 3 ect but I think I am out of sequence with the Bind Event that is messing up when trying to remove Gets to specific buttons/an array made up of them.
Is there a valid way to set the target of the construction to a generic variable with a type of my custom button object which I can then update to what is being pressed and also have that accepted as a target of set color ect?