While creating buttons is all well and good, at the moment, any UI element you add to the player's screen just sits there without anything happening, even if a user clicks on it. We don't have any event handlers attached to the Slate elements at the moment, so events such as mouse clicks don't actually cause anything to happen.
Attaching function calls to Slate events
Getting ready
This recipe shows you how to attach functions to these events so that we can run custom code when they occur.
How to do it...
- Create a new GameModeBase subclass called ClickEventGameMode...