Menu's and GameInstance in Code

Hi all. Anyone know how I could start doing something like this in code?

What are the major benefits to doing this sort of thing in code?

I’ve managed to make it all work as it is in BP. Wanted to implement the same thing in code.

Thanks all!