Chapter 9. User Interfaces – UI and UMG

In this chapter, we will cover the following topics:

  • Drawing using Canvas
  • Adding Slate Widgets to the screen
  • Creating screen size-aware scaling for the UI
  • Displaying and hiding a sheet of UMG elements in-game
  • Attaching function calls to Slate events
  • Using Data Binding with Unreal Motion Graphics
  • Controlling widget appearance with Styles
  • Creating a custom SWidget/UWidget

Introduction

Displaying feedback to the player is one of the most important elements within game design, and this will usually involve some sort of HUD, or at least menus, within your game.

In previous versions of Unreal, there was simple HUD support, which allowed you to draw simple shapes and text to the screen. However, it was somewhat limited in ...

Get Unreal Engine 4 Scripting with C++ Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.