Is there any way to bind animation playing on UMG to a var?

I made a menu in which the selected entry blinks while the not selected entries dimmer. At the moment everything is hard coded, but i would like to be able to change the behaviour to be more data driven. Create just a text widget with the desired behaviour, and on construct create as many instances as needed. At the moment i can create the entries at the construct stages but to change the state of the animation i must use a cast, which kinda toses aside the optimization idea. for a menu.

As a note, the menu doesnt accept mouse input, so on click and on hover are not an option.

As a note, the menu doesnt accept
mouse input, so on click and on hover
are not an option.

How are you selecting the entries then?

Sorry, didnt know about the comment section and since it didnt show answers i didnt enter to my question. Just though about it today.

To answer your question, I interact with a simple integer system, each entry gets asigned an index that is stored internally, get a reference to the parent, and in the widget i simply increase or decrease the index clamped to 0 as the first and the last index as the max unless i want it to loop. The Accept action goes through a switch that select the path depending on this index. Pretty simple actually, my only problem is how to get the entry to be animated when selected and stop when not selected. I could just change the color, but i dont want to use simple solid colors. Maybe i’ll use the tick event to drive it, but i would prefer to avoid it if possible

To answer your question, I interact
with a simple integer system

How do you interact with it then? There must be something that triggers the blinking animation.

I made a menu in which the selected
entry blinks while the not selected
entries dimmer.

To clarify. You need a list of entries, the currently selected one is looping an animation and the last selected one dims to normal when a new one is selected, is that correct?

At the moment is hard coded with animations within the widget, an animation for each entry and on construct add each in an array. Also made a custom event to call the animation.

Each time i increase index call the animation event.

If im at index 3 then play the animation 3 on the array of animations.

it works, but i dont like it cause is not optimal and when i have many options i have to create an animation for each.