How it works...

Your widget's Blueprint button events can be easily connected to Blueprint events, or C++ functions by creating  a UFUNCTION() that has the BlueprintCallable tag in the macro.

For more information on using UMG and building simple menus and displaying them using Blueprints, check out https://docs.unrealengine.com/en-us/Engine/UMG/HowTo/CreatingWidgets.