Hello, let me start off by saying that this is more of an answer than a question…
So basically I searched if there were any tutorials on making a button in UMG that would cycle through some options within its corresponding widget, I sadly found nothing so I had to think of a way to do it myself, which I did!
So I made this Gift making game for a Christmas project at my college and needed to make a menu that would cycle through different toys to put within said gift. Right now this is very basic and just cycles through the toy options and doesn’t actually do much (I might post an update when I make improvements upon it).
So firstly, here’s how my widget looks (it is 500 x 500 so that it can be dragged into the editor as a 3d object, google it), you can see all of the images, buttons and text. I made two animations for each of the toy images with the corresponding button and text attached (because Unreal currently doesn’t support reversing animations in UMG). These are simple flying in with a fade in and flying out with a fade out.
Secondly, this is the event construct which makes sure that you can’t see or click any of the buttons whilst the first animation is playing.
Thirdly, this is the overview of how the actual button works (to make the current image fly and fade out to the right and then make the next one fly in and fade in, and so on, and so forth), basically I found the best way to do this is through branches and a couple of booleans (one for each image). So each time the button is pressed it checks through the booleans until it reaches one which is set to true and then executes the animations with fades and also disabling and re-enabling the buttons so that the user can’t confuse the widget. At the end of each line of nodes I set the boolean for the next image to true so that it fires. I’d say the rest is pretty self explanatory, you can just follow the threads easily. I’ll put some more close-up photos of the branches and the first line of nodes. Thanks for reading and your welcome if this helped. please feel free to make improvements and post them in this post.
P.S. I didn’t make the Previous button work as I only remembered at the end that Unreal can’t reverse animations in UMG and so I have to make two more sets of animations for each image (which I’ll do at another time), but I believe the same general idea should apply to that.