SlideShare a Scribd company logo
Unreal Engine Basics
Chapter 5: User Interface
Nick Prühs
Objectives
• Understanding the difference between Unreal’s UI frameworks Slate
and UMG
• Learning how to create basic and complex user interfaces in UMG
• Learning how to build a simple main menu
Slate & UMG
• Cross-platform user interface framework for creating tool and in-game
UIs
 SWidget base class for all Slate widgets, prefixed with S
 Declarative Syntax
• Wrapped by Unreal Motion Graphics UI Designer (UMG)
 UWidget base class for all UMG widgets
 Higher level, and as UObjects, accounted for by the garbage collector
Slate Example
Example taken from SLoadingScreenTestWidget::Construct
SNew(SVerticalBox)
+SVerticalBox::Slot()
.VAlign(VAlign_Center)
.HAlign(HAlign_Center)
[
SNew(SThrobber)
.Visibility(this, &SLoadingScreenTestWidget::GetLoadIndicatorVisibility)
]
+SVerticalBox::Slot()
.VAlign(VAlign_Center)
.HAlign(HAlign_Center)
[
SNew(STextBlock)
.Text(NSLOCTEXT("MoviePlayerTestLoadingScreen", "LoadingComplete", "Loading complete!"))
.Visibility(this, &SLoadingScreenTestWidget::GetMessageIndicatorVisibility)
]
Widget Blueprints
• Derived from UUserWidget
• Familiar editor
 Designer
 Blueprint Graph
o Events, functions and variables just as with any other blueprint
o Widgets can be explicitly exposed as variable from the designer window
• Built-in support for UI animations
• Widget blueprints can reference other widget blueprints, allowing for
a very modular UI
Widget Blueprints
Can be created and added to the viewport in your PlayerController:
Built-In Widgets
Panels
• Canvas Panel: Allows widgets to be laid out at arbitrary locations, anchored
and z-ordered with other children of the canvas.
• Grid Panel: Evenly divides up available space between all of its children.
• Horizontal Box: Allows widgets to be laid out in a flow horizontally.
• Scroll Box: Scrollable collection of widgets.
• Vertical Box: Allows child widgets to be automatically laid out vertically.
• Widget Switcher: Like a tab control, but without tabs. At most one widget is
visible at time.
• Wrap Box: Arranges widgets left-to-right. When the widgets exceed the
width, it will place widgets on the next line.
Built-In Widgets
Common
• Border: Container widget that can contain one child widget, providing an opportunity to
surround it with a background image and adjustable padding.
• Button: Click-able primitive widget to enable basic interaction.
• CheckBox: Allows you to display a toggled state of 'unchecked', 'checked' and
'indeterminable. You can use the checkbox for a classic checkbox, or as a toggle button, or
as radio buttons.
• Image: Allows you to display a Slate Brush, or texture or material in the UI.
• ProgressBar: Simple bar that fills up.
• RichTextBlock: Text widget supporting inline styles.
• Slider: Shows a sliding bar with a handle that allows you to control the value between 0..1.
• Text: Simple static text widget.
Built-In Widgets
Input
• ComboBox: Displays a list of options to the user in a dropdown menu.
• SpinBox: Numerical entry box that allows for direct entry of the number.
• TextBox: Allows the user to type in custom text.
Other
• (Circular) Throbber: Shows several zooming circles in a row.
• Spacer: Provides padding between other widgets.
• Background Blur: Can contain one child widget, applying a post-process Gaussian
blur to all content beneath it.
Widget Properties
• Appearance
 Color & Opacity: Tints all child widgets.
 Padding: Padding area around the content.
• Interaction
 IsFocusable: Allows this widget to accept focus when clicked, or when
navigated to.
• Behavior
 TooltipWidget: Tooltip widget to show when the user hovers over the
widget with the mouse.
 Is Enabled: Whether this widget can be modified interactively by the
user.
 Visiblity: Visibility of the widget.
Visibility
• Visible: Visible and hit-testable (can interact with cursor). (Default)
• Collapsed: Not visible and takes up no space in the layout (obviously
not hit-testable).
• Hidden: Not visible but occupies layout space (obviously not hit-
testable).
• HitTestInvisible: Visible but not hit-testable (cannot interact with
cursor) and children in the hierarchy (if any) are also not hit-testable.
• SelfHitTestInvisible: Visible but not hit-testable (cannot interact with
cursor), but doesn't affect hit-testing on children (if any).
Canvas Panel Slots
• Anchors
• Position
• Size
• Alignment: Pivot point of the widget.
• Size To Content
• Z Order: Higher values appear on top.
UMG Anchors
Horizontal/Vertical Box Slots
• Padding
• Size
 Auto: Only requests as much
room as it needs based on
the widgets desired size.
 Fill: Greedily attempts to fill
all available room based on
the percentage value 0..1
• Horizontal Alignment
• Vertical Alignment
UMG Box Slot
Text
• Color & Opacity
• Font
• Min Desired Width
• Justification
• Wrapping
UMG Text Block
Fonts
• Font Family
• Typeface
• Size
• Outline Size & Color
UMG Text Block
Localization
• Texts are referenced by namespace & key
• String Tables with texts can be imported from/exported to CSV
Brushes
• Image
• Image Size
• Tint
• Draw As
 None: Don't do anything.
 Box: Draw a 3x3 box where the sides
and the middle stretch based on the
margin.
 Border: Draw a 3x3 border where the
sides tile and the middle is empty.
 Image: Draw an image, ignoring
margin.
• Tiling
• Color & Opacity
Slate Brush
Blueprint Event Binding
• In blueprints, you can bind events in two ways:
 By linking them directly to a (custom) event in your event graph
 By using a Create Event node referencing another event or function
o In functions, only the second option is available.
Button
• Brushes for every state
 Normal
 Hovered
 Pressed
 Disabled
• Hovered and Clicked events
• Single child
 e.g. text, image
UMG Button
Creating Re-Usable Widgets
• Expose public variables for specifying your parameters (e.g. button
text, style)
• Implement PreConstruct event in your widget to apply settings
• Allows for live updates in widget designer
Traveling
Traveling to another level can be achieved by calling Open Level:
• Can specify either a level name or an IP address to travel to
• May provide arbitrary options in form of a “travel URL”:
DM-AwesomeMap?name=FastFragg0r
• Options are automatically passed to be parsed by
AGameMode::InitGame, for instance
Traveling
Reserved built-in travel options include:
• listen: Loads the map as listen server.
• restart: Causes Unreal to just reload the current level.
• closed: Automatically appended by the engine to signal a failed
connection attempt.
• failed: Automatically appended by the engine to signal a failed
connection attempt.
• name: Player name to be set on the PlayerState.
• spectatorOnly: Join as spectator player.
Level Blueprints
• Each level has its own dedicated level blueprint that behaves just like
any other actor blueprint
• Allows to directly reference actors placed in that level
• There are various paradigms on how to deal with level blueprints…
 Don’t use them at all
 Use for inter-blueprint communication, only
 Use them for everything
Hint!
You can specify whether or not to show a mouse cursor with the
Show Mouse Cursor flag of your PlayerController.
Assignment #5 – User Interface
1. Create an ingame HUD with a crosshair.
2. Add a health display to your HUD.
3. Bind input for showing an ingame scoreboard.
4. Create a very basic main menu level and UI.
References
• Epic Games. Slate Overview. https://docs.unrealengine.com/en-
US/Programming/Slate/Overview/index.html, February 2020.
• Epic Games. UMG UI Designer User Guide.
https://docs.unrealengine.com/en-
US/Engine/UMG/UserGuide/index.html, February 2020.
See you next time!
https://www.slideshare.net/npruehs
https://github.com/npruehs/teaching-
unreal-engine/releases/tag/assignment05
npruehs@outlook.com
5 Minute Review Session
• What is the difference between Slate and UMG?
• How can you create a very modular UI in UMG?
• What do you need to do to show your widgets ingame?
• Which kinds of panels do you know?
• What’s the difference between collapsed and hidden visibility?
• Which UI concept facilitates creating resolution-independent UIs?
• How do your globalize your game?
• How can you load another map while ingame?

More Related Content

What's hot

Game development
Game developmentGame development
Game development
RareCoders
 
Introduction to Game Engine: Concepts & Components
Introduction to Game Engine: Concepts & ComponentsIntroduction to Game Engine: Concepts & Components
Introduction to Game Engine: Concepts & Components
Pouya Pournasir
 
LiveOps as a Service | Scott Humphries
LiveOps as a Service | Scott HumphriesLiveOps as a Service | Scott Humphries
LiveOps as a Service | Scott Humphries
Jessica Tams
 
Introduction to Game Development
Introduction to Game DevelopmentIntroduction to Game Development
Introduction to Game Development
Sumit Jain
 
Fps 모드의 분석(FPS MODE ANALYSIS)
Fps 모드의 분석(FPS MODE ANALYSIS)Fps 모드의 분석(FPS MODE ANALYSIS)
Fps 모드의 분석(FPS MODE ANALYSIS)
준태 김
 
Game Design Process
Game Design ProcessGame Design Process
Game Design Process
Martin Sillaots
 
Unreal Engine (For Creating Games) Presentation
Unreal Engine (For Creating Games) PresentationUnreal Engine (For Creating Games) Presentation
Unreal Engine (For Creating Games) Presentation
Nitin Sharma
 
Unreal Open Day 2017 UE4 for Mobile: The Future of High Quality Mobile Games
Unreal Open Day 2017 UE4 for Mobile: The Future of High Quality Mobile GamesUnreal Open Day 2017 UE4 for Mobile: The Future of High Quality Mobile Games
Unreal Open Day 2017 UE4 for Mobile: The Future of High Quality Mobile Games
Epic Games China
 
Developing a Multiplayer RTS with the Unreal Engine 3
Developing a Multiplayer RTS with the Unreal Engine 3Developing a Multiplayer RTS with the Unreal Engine 3
Developing a Multiplayer RTS with the Unreal Engine 3
Nick Pruehs
 
쩌는게임기획서 이렇게 쓴다
쩌는게임기획서 이렇게 쓴다쩌는게임기획서 이렇게 쓴다
쩌는게임기획서 이렇게 쓴다
Jinho Jung
 
Unreal Engine 4 Introduction
Unreal Engine 4 IntroductionUnreal Engine 4 Introduction
Unreal Engine 4 Introduction
Sperasoft
 
MMORPGで考えるレベルデザイン
MMORPGで考えるレベルデザインMMORPGで考えるレベルデザイン
MMORPGで考えるレベルデザイン
Katsumi Mizushima
 
Romero Blueprint Compendium
Romero Blueprint CompendiumRomero Blueprint Compendium
Romero Blueprint Compendium
Unreal Engine
 
Game Programming 03 - Git Flow
Game Programming 03 - Git FlowGame Programming 03 - Git Flow
Game Programming 03 - Git Flow
Nick Pruehs
 
Introduction to Game Design
Introduction to Game DesignIntroduction to Game Design
Introduction to Game Design
Christian Chomiak
 
Game Programming 07 - Procedural Content Generation
Game Programming 07 - Procedural Content GenerationGame Programming 07 - Procedural Content Generation
Game Programming 07 - Procedural Content Generation
Nick Pruehs
 
Game Design Document - Step by Step Guide
Game Design Document - Step by Step GuideGame Design Document - Step by Step Guide
Game Design Document - Step by Step Guide
DevBatch Inc.
 
Introduction to Game Development
Introduction to Game DevelopmentIntroduction to Game Development
Introduction to Game Development
Reggie Niccolo Santos
 
게임업계에서 내가 하고 싶은 일 찾는 방법
게임업계에서 내가 하고 싶은 일 찾는 방법게임업계에서 내가 하고 싶은 일 찾는 방법
게임업계에서 내가 하고 싶은 일 찾는 방법
Donghun Lee
 
Game Development with Unity
Game Development with UnityGame Development with Unity
Game Development with Unity
davidluzgouveia
 

What's hot (20)

Game development
Game developmentGame development
Game development
 
Introduction to Game Engine: Concepts & Components
Introduction to Game Engine: Concepts & ComponentsIntroduction to Game Engine: Concepts & Components
Introduction to Game Engine: Concepts & Components
 
LiveOps as a Service | Scott Humphries
LiveOps as a Service | Scott HumphriesLiveOps as a Service | Scott Humphries
LiveOps as a Service | Scott Humphries
 
Introduction to Game Development
Introduction to Game DevelopmentIntroduction to Game Development
Introduction to Game Development
 
Fps 모드의 분석(FPS MODE ANALYSIS)
Fps 모드의 분석(FPS MODE ANALYSIS)Fps 모드의 분석(FPS MODE ANALYSIS)
Fps 모드의 분석(FPS MODE ANALYSIS)
 
Game Design Process
Game Design ProcessGame Design Process
Game Design Process
 
Unreal Engine (For Creating Games) Presentation
Unreal Engine (For Creating Games) PresentationUnreal Engine (For Creating Games) Presentation
Unreal Engine (For Creating Games) Presentation
 
Unreal Open Day 2017 UE4 for Mobile: The Future of High Quality Mobile Games
Unreal Open Day 2017 UE4 for Mobile: The Future of High Quality Mobile GamesUnreal Open Day 2017 UE4 for Mobile: The Future of High Quality Mobile Games
Unreal Open Day 2017 UE4 for Mobile: The Future of High Quality Mobile Games
 
Developing a Multiplayer RTS with the Unreal Engine 3
Developing a Multiplayer RTS with the Unreal Engine 3Developing a Multiplayer RTS with the Unreal Engine 3
Developing a Multiplayer RTS with the Unreal Engine 3
 
쩌는게임기획서 이렇게 쓴다
쩌는게임기획서 이렇게 쓴다쩌는게임기획서 이렇게 쓴다
쩌는게임기획서 이렇게 쓴다
 
Unreal Engine 4 Introduction
Unreal Engine 4 IntroductionUnreal Engine 4 Introduction
Unreal Engine 4 Introduction
 
MMORPGで考えるレベルデザイン
MMORPGで考えるレベルデザインMMORPGで考えるレベルデザイン
MMORPGで考えるレベルデザイン
 
Romero Blueprint Compendium
Romero Blueprint CompendiumRomero Blueprint Compendium
Romero Blueprint Compendium
 
Game Programming 03 - Git Flow
Game Programming 03 - Git FlowGame Programming 03 - Git Flow
Game Programming 03 - Git Flow
 
Introduction to Game Design
Introduction to Game DesignIntroduction to Game Design
Introduction to Game Design
 
Game Programming 07 - Procedural Content Generation
Game Programming 07 - Procedural Content GenerationGame Programming 07 - Procedural Content Generation
Game Programming 07 - Procedural Content Generation
 
Game Design Document - Step by Step Guide
Game Design Document - Step by Step GuideGame Design Document - Step by Step Guide
Game Design Document - Step by Step Guide
 
Introduction to Game Development
Introduction to Game DevelopmentIntroduction to Game Development
Introduction to Game Development
 
게임업계에서 내가 하고 싶은 일 찾는 방법
게임업계에서 내가 하고 싶은 일 찾는 방법게임업계에서 내가 하고 싶은 일 찾는 방법
게임업계에서 내가 하고 싶은 일 찾는 방법
 
Game Development with Unity
Game Development with UnityGame Development with Unity
Game Development with Unity
 

Similar to Unreal Engine Basics 05 - User Interface

tL19 awt
tL19 awttL19 awt
tL19 awt
teach4uin
 
East Coast DevCon 2014: The Slate UI Framework - Architecture & Tools
East Coast DevCon 2014: The Slate UI Framework - Architecture & ToolsEast Coast DevCon 2014: The Slate UI Framework - Architecture & Tools
East Coast DevCon 2014: The Slate UI Framework - Architecture & Tools
Gerke Max Preussner
 
14a-gui.ppt
14a-gui.ppt14a-gui.ppt
14a-gui.ppt
DrDGayathriDevi
 
Start developing projects with Scratch Programming
Start developing projects with Scratch ProgrammingStart developing projects with Scratch Programming
Start developing projects with Scratch Programming
PrakritiDhang
 
GUI In Python.pdf By : Sangeeta M Chauhan , Gwalior
GUI In Python.pdf By : Sangeeta M Chauhan , GwaliorGUI In Python.pdf By : Sangeeta M Chauhan , Gwalior
GUI In Python.pdf By : Sangeeta M Chauhan , Gwalior
jonathanlimberestrad
 
Android and IOS UI Development (Android 5.0 and iOS 9.0)
Android and IOS UI Development (Android 5.0 and iOS 9.0)Android and IOS UI Development (Android 5.0 and iOS 9.0)
Android and IOS UI Development (Android 5.0 and iOS 9.0)
Michael Shrove
 
Robot flash tutorial
Robot flash tutorialRobot flash tutorial
Robot flash tutorial
Foredi Surabaya
 
Swift
SwiftSwift
Swift
Larry Ball
 
Cets 2016 felstehausen wallace to use a layer state change or new slide, that...
Cets 2016 felstehausen wallace to use a layer state change or new slide, that...Cets 2016 felstehausen wallace to use a layer state change or new slide, that...
Cets 2016 felstehausen wallace to use a layer state change or new slide, that...
Chicago eLearning & Technology Showcase
 
Divergent and Convergent Thinking – Brain
Divergent and Convergent Thinking – BrainDivergent and Convergent Thinking – Brain
Divergent and Convergent Thinking – Brain
ROHISIVAM
 
Drawing Tool
Drawing ToolDrawing Tool
Drawing Tool
Dinesh Pathak
 
03_GUI.ppt
03_GUI.ppt03_GUI.ppt
03_GUI.ppt
DrDGayathriDevi
 
JAVA Programming: Topic -AWT(Abstract Window Tool )
JAVA Programming: Topic -AWT(Abstract Window Tool )JAVA Programming: Topic -AWT(Abstract Window Tool )
JAVA Programming: Topic -AWT(Abstract Window Tool )
Navya Francis
 
Visual Basic IDE Intro.pdf
Visual Basic IDE Intro.pdfVisual Basic IDE Intro.pdf
Visual Basic IDE Intro.pdf
sheenmarie0212
 
Visual Basic IDE Introduction
Visual Basic IDE IntroductionVisual Basic IDE Introduction
Visual Basic IDE Introduction
Ahllen Javier
 
Lecture 5 _ Building Layouts (1).pptx
Lecture 5 _ Building Layouts (1).pptxLecture 5 _ Building Layouts (1).pptx
Lecture 5 _ Building Layouts (1).pptx
ssuser0ee7de1
 
Ajp notes-chapter-01
Ajp notes-chapter-01Ajp notes-chapter-01
Ajp notes-chapter-01
JONDHLEPOLY
 
Mobile Application Development class 005
Mobile Application Development class 005Mobile Application Development class 005
Mobile Application Development class 005
Dr. Mazin Mohamed alkathiri
 
Microsoft Windows 7 Fundamentals (8th Ed.)
Microsoft Windows 7 Fundamentals (8th Ed.)Microsoft Windows 7 Fundamentals (8th Ed.)
Microsoft Windows 7 Fundamentals (8th Ed.)
Lindsay Henning @ Yavapai College
 
Ch4 creating user interfaces
Ch4 creating user interfacesCh4 creating user interfaces
Ch4 creating user interfaces
Shih-Hsiang Lin
 

Similar to Unreal Engine Basics 05 - User Interface (20)

tL19 awt
tL19 awttL19 awt
tL19 awt
 
East Coast DevCon 2014: The Slate UI Framework - Architecture & Tools
East Coast DevCon 2014: The Slate UI Framework - Architecture & ToolsEast Coast DevCon 2014: The Slate UI Framework - Architecture & Tools
East Coast DevCon 2014: The Slate UI Framework - Architecture & Tools
 
14a-gui.ppt
14a-gui.ppt14a-gui.ppt
14a-gui.ppt
 
Start developing projects with Scratch Programming
Start developing projects with Scratch ProgrammingStart developing projects with Scratch Programming
Start developing projects with Scratch Programming
 
GUI In Python.pdf By : Sangeeta M Chauhan , Gwalior
GUI In Python.pdf By : Sangeeta M Chauhan , GwaliorGUI In Python.pdf By : Sangeeta M Chauhan , Gwalior
GUI In Python.pdf By : Sangeeta M Chauhan , Gwalior
 
Android and IOS UI Development (Android 5.0 and iOS 9.0)
Android and IOS UI Development (Android 5.0 and iOS 9.0)Android and IOS UI Development (Android 5.0 and iOS 9.0)
Android and IOS UI Development (Android 5.0 and iOS 9.0)
 
Robot flash tutorial
Robot flash tutorialRobot flash tutorial
Robot flash tutorial
 
Swift
SwiftSwift
Swift
 
Cets 2016 felstehausen wallace to use a layer state change or new slide, that...
Cets 2016 felstehausen wallace to use a layer state change or new slide, that...Cets 2016 felstehausen wallace to use a layer state change or new slide, that...
Cets 2016 felstehausen wallace to use a layer state change or new slide, that...
 
Divergent and Convergent Thinking – Brain
Divergent and Convergent Thinking – BrainDivergent and Convergent Thinking – Brain
Divergent and Convergent Thinking – Brain
 
Drawing Tool
Drawing ToolDrawing Tool
Drawing Tool
 
03_GUI.ppt
03_GUI.ppt03_GUI.ppt
03_GUI.ppt
 
JAVA Programming: Topic -AWT(Abstract Window Tool )
JAVA Programming: Topic -AWT(Abstract Window Tool )JAVA Programming: Topic -AWT(Abstract Window Tool )
JAVA Programming: Topic -AWT(Abstract Window Tool )
 
Visual Basic IDE Intro.pdf
Visual Basic IDE Intro.pdfVisual Basic IDE Intro.pdf
Visual Basic IDE Intro.pdf
 
Visual Basic IDE Introduction
Visual Basic IDE IntroductionVisual Basic IDE Introduction
Visual Basic IDE Introduction
 
Lecture 5 _ Building Layouts (1).pptx
Lecture 5 _ Building Layouts (1).pptxLecture 5 _ Building Layouts (1).pptx
Lecture 5 _ Building Layouts (1).pptx
 
Ajp notes-chapter-01
Ajp notes-chapter-01Ajp notes-chapter-01
Ajp notes-chapter-01
 
Mobile Application Development class 005
Mobile Application Development class 005Mobile Application Development class 005
Mobile Application Development class 005
 
Microsoft Windows 7 Fundamentals (8th Ed.)
Microsoft Windows 7 Fundamentals (8th Ed.)Microsoft Windows 7 Fundamentals (8th Ed.)
Microsoft Windows 7 Fundamentals (8th Ed.)
 
Ch4 creating user interfaces
Ch4 creating user interfacesCh4 creating user interfaces
Ch4 creating user interfaces
 

More from Nick Pruehs

Unreal Engine Basics 06 - Animation, Audio, Visual Effects
Unreal Engine Basics 06 - Animation, Audio, Visual EffectsUnreal Engine Basics 06 - Animation, Audio, Visual Effects
Unreal Engine Basics 06 - Animation, Audio, Visual Effects
Nick Pruehs
 
Unreal Engine Basics 04 - Behavior Trees
Unreal Engine Basics 04 - Behavior TreesUnreal Engine Basics 04 - Behavior Trees
Unreal Engine Basics 04 - Behavior Trees
Nick Pruehs
 
Game Programming - Cloud Development
Game Programming - Cloud DevelopmentGame Programming - Cloud Development
Game Programming - Cloud Development
Nick Pruehs
 
Game Programming - Git
Game Programming - GitGame Programming - Git
Game Programming - Git
Nick Pruehs
 
Eight Rules for Making Your First Great Game
Eight Rules for Making Your First Great GameEight Rules for Making Your First Great Game
Eight Rules for Making Your First Great Game
Nick Pruehs
 
Designing an actor model game architecture with Pony
Designing an actor model game architecture with PonyDesigning an actor model game architecture with Pony
Designing an actor model game architecture with Pony
Nick Pruehs
 
Game Programming 13 - Debugging & Performance Optimization
Game Programming 13 - Debugging & Performance OptimizationGame Programming 13 - Debugging & Performance Optimization
Game Programming 13 - Debugging & Performance Optimization
Nick Pruehs
 
Scrum - but... Agile Game Development in Small Teams
Scrum - but... Agile Game Development in Small TeamsScrum - but... Agile Game Development in Small Teams
Scrum - but... Agile Game Development in Small Teams
Nick Pruehs
 
Component-Based Entity Systems (Demo)
Component-Based Entity Systems (Demo)Component-Based Entity Systems (Demo)
Component-Based Entity Systems (Demo)
Nick Pruehs
 
What Would Blizzard Do
What Would Blizzard DoWhat Would Blizzard Do
What Would Blizzard Do
Nick Pruehs
 
School For Games 2015 - Unity Engine Basics
School For Games 2015 - Unity Engine BasicsSchool For Games 2015 - Unity Engine Basics
School For Games 2015 - Unity Engine Basics
Nick Pruehs
 
Tool Development A - Git
Tool Development A - GitTool Development A - Git
Tool Development A - Git
Nick Pruehs
 
Game Programming 12 - Shaders
Game Programming 12 - ShadersGame Programming 12 - Shaders
Game Programming 12 - Shaders
Nick Pruehs
 
Game Programming 11 - Game Physics
Game Programming 11 - Game PhysicsGame Programming 11 - Game Physics
Game Programming 11 - Game Physics
Nick Pruehs
 
Game Programming 10 - Localization
Game Programming 10 - LocalizationGame Programming 10 - Localization
Game Programming 10 - Localization
Nick Pruehs
 
Game Programming 09 - AI
Game Programming 09 - AIGame Programming 09 - AI
Game Programming 09 - AI
Nick Pruehs
 
Game Development Challenges
Game Development ChallengesGame Development Challenges
Game Development Challenges
Nick Pruehs
 
Game Programming 08 - Tool Development
Game Programming 08 - Tool DevelopmentGame Programming 08 - Tool Development
Game Programming 08 - Tool Development
Nick Pruehs
 
Game Programming 06 - Automated Testing
Game Programming 06 - Automated TestingGame Programming 06 - Automated Testing
Game Programming 06 - Automated Testing
Nick Pruehs
 
Game Programming 05 - Development Tools
Game Programming 05 - Development ToolsGame Programming 05 - Development Tools
Game Programming 05 - Development Tools
Nick Pruehs
 

More from Nick Pruehs (20)

Unreal Engine Basics 06 - Animation, Audio, Visual Effects
Unreal Engine Basics 06 - Animation, Audio, Visual EffectsUnreal Engine Basics 06 - Animation, Audio, Visual Effects
Unreal Engine Basics 06 - Animation, Audio, Visual Effects
 
Unreal Engine Basics 04 - Behavior Trees
Unreal Engine Basics 04 - Behavior TreesUnreal Engine Basics 04 - Behavior Trees
Unreal Engine Basics 04 - Behavior Trees
 
Game Programming - Cloud Development
Game Programming - Cloud DevelopmentGame Programming - Cloud Development
Game Programming - Cloud Development
 
Game Programming - Git
Game Programming - GitGame Programming - Git
Game Programming - Git
 
Eight Rules for Making Your First Great Game
Eight Rules for Making Your First Great GameEight Rules for Making Your First Great Game
Eight Rules for Making Your First Great Game
 
Designing an actor model game architecture with Pony
Designing an actor model game architecture with PonyDesigning an actor model game architecture with Pony
Designing an actor model game architecture with Pony
 
Game Programming 13 - Debugging & Performance Optimization
Game Programming 13 - Debugging & Performance OptimizationGame Programming 13 - Debugging & Performance Optimization
Game Programming 13 - Debugging & Performance Optimization
 
Scrum - but... Agile Game Development in Small Teams
Scrum - but... Agile Game Development in Small TeamsScrum - but... Agile Game Development in Small Teams
Scrum - but... Agile Game Development in Small Teams
 
Component-Based Entity Systems (Demo)
Component-Based Entity Systems (Demo)Component-Based Entity Systems (Demo)
Component-Based Entity Systems (Demo)
 
What Would Blizzard Do
What Would Blizzard DoWhat Would Blizzard Do
What Would Blizzard Do
 
School For Games 2015 - Unity Engine Basics
School For Games 2015 - Unity Engine BasicsSchool For Games 2015 - Unity Engine Basics
School For Games 2015 - Unity Engine Basics
 
Tool Development A - Git
Tool Development A - GitTool Development A - Git
Tool Development A - Git
 
Game Programming 12 - Shaders
Game Programming 12 - ShadersGame Programming 12 - Shaders
Game Programming 12 - Shaders
 
Game Programming 11 - Game Physics
Game Programming 11 - Game PhysicsGame Programming 11 - Game Physics
Game Programming 11 - Game Physics
 
Game Programming 10 - Localization
Game Programming 10 - LocalizationGame Programming 10 - Localization
Game Programming 10 - Localization
 
Game Programming 09 - AI
Game Programming 09 - AIGame Programming 09 - AI
Game Programming 09 - AI
 
Game Development Challenges
Game Development ChallengesGame Development Challenges
Game Development Challenges
 
Game Programming 08 - Tool Development
Game Programming 08 - Tool DevelopmentGame Programming 08 - Tool Development
Game Programming 08 - Tool Development
 
Game Programming 06 - Automated Testing
Game Programming 06 - Automated TestingGame Programming 06 - Automated Testing
Game Programming 06 - Automated Testing
 
Game Programming 05 - Development Tools
Game Programming 05 - Development ToolsGame Programming 05 - Development Tools
Game Programming 05 - Development Tools
 

Recently uploaded

Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
Ivo Velitchkov
 
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
zjhamm304
 
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
"Scaling RAG Applications to serve millions of users",  Kevin Goedecke"Scaling RAG Applications to serve millions of users",  Kevin Goedecke
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
Fwdays
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
operationspcvita
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
DianaGray10
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
Neo4j
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 
Demystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through StorytellingDemystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through Storytelling
Enterprise Knowledge
 
From Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMsFrom Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMs
Sease
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
christinelarrosa
 
Christine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptxChristine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptx
christinelarrosa
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Neo4j
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
Fwdays
 
What is an RPA CoE? Session 2 – CoE Roles
What is an RPA CoE?  Session 2 – CoE RolesWhat is an RPA CoE?  Session 2 – CoE Roles
What is an RPA CoE? Session 2 – CoE Roles
DianaGray10
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
Pablo Gómez Abajo
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
Fwdays
 

Recently uploaded (20)

Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
 
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
 
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
"Scaling RAG Applications to serve millions of users",  Kevin Goedecke"Scaling RAG Applications to serve millions of users",  Kevin Goedecke
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 
Demystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through StorytellingDemystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through Storytelling
 
From Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMsFrom Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMs
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
 
Christine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptxChristine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptx
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
 
What is an RPA CoE? Session 2 – CoE Roles
What is an RPA CoE?  Session 2 – CoE RolesWhat is an RPA CoE?  Session 2 – CoE Roles
What is an RPA CoE? Session 2 – CoE Roles
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
 

Unreal Engine Basics 05 - User Interface

  • 1. Unreal Engine Basics Chapter 5: User Interface Nick Prühs
  • 2. Objectives • Understanding the difference between Unreal’s UI frameworks Slate and UMG • Learning how to create basic and complex user interfaces in UMG • Learning how to build a simple main menu
  • 3. Slate & UMG • Cross-platform user interface framework for creating tool and in-game UIs  SWidget base class for all Slate widgets, prefixed with S  Declarative Syntax • Wrapped by Unreal Motion Graphics UI Designer (UMG)  UWidget base class for all UMG widgets  Higher level, and as UObjects, accounted for by the garbage collector
  • 4. Slate Example Example taken from SLoadingScreenTestWidget::Construct SNew(SVerticalBox) +SVerticalBox::Slot() .VAlign(VAlign_Center) .HAlign(HAlign_Center) [ SNew(SThrobber) .Visibility(this, &SLoadingScreenTestWidget::GetLoadIndicatorVisibility) ] +SVerticalBox::Slot() .VAlign(VAlign_Center) .HAlign(HAlign_Center) [ SNew(STextBlock) .Text(NSLOCTEXT("MoviePlayerTestLoadingScreen", "LoadingComplete", "Loading complete!")) .Visibility(this, &SLoadingScreenTestWidget::GetMessageIndicatorVisibility) ]
  • 5. Widget Blueprints • Derived from UUserWidget • Familiar editor  Designer  Blueprint Graph o Events, functions and variables just as with any other blueprint o Widgets can be explicitly exposed as variable from the designer window • Built-in support for UI animations • Widget blueprints can reference other widget blueprints, allowing for a very modular UI
  • 6. Widget Blueprints Can be created and added to the viewport in your PlayerController:
  • 7. Built-In Widgets Panels • Canvas Panel: Allows widgets to be laid out at arbitrary locations, anchored and z-ordered with other children of the canvas. • Grid Panel: Evenly divides up available space between all of its children. • Horizontal Box: Allows widgets to be laid out in a flow horizontally. • Scroll Box: Scrollable collection of widgets. • Vertical Box: Allows child widgets to be automatically laid out vertically. • Widget Switcher: Like a tab control, but without tabs. At most one widget is visible at time. • Wrap Box: Arranges widgets left-to-right. When the widgets exceed the width, it will place widgets on the next line.
  • 8. Built-In Widgets Common • Border: Container widget that can contain one child widget, providing an opportunity to surround it with a background image and adjustable padding. • Button: Click-able primitive widget to enable basic interaction. • CheckBox: Allows you to display a toggled state of 'unchecked', 'checked' and 'indeterminable. You can use the checkbox for a classic checkbox, or as a toggle button, or as radio buttons. • Image: Allows you to display a Slate Brush, or texture or material in the UI. • ProgressBar: Simple bar that fills up. • RichTextBlock: Text widget supporting inline styles. • Slider: Shows a sliding bar with a handle that allows you to control the value between 0..1. • Text: Simple static text widget.
  • 9. Built-In Widgets Input • ComboBox: Displays a list of options to the user in a dropdown menu. • SpinBox: Numerical entry box that allows for direct entry of the number. • TextBox: Allows the user to type in custom text. Other • (Circular) Throbber: Shows several zooming circles in a row. • Spacer: Provides padding between other widgets. • Background Blur: Can contain one child widget, applying a post-process Gaussian blur to all content beneath it.
  • 10. Widget Properties • Appearance  Color & Opacity: Tints all child widgets.  Padding: Padding area around the content. • Interaction  IsFocusable: Allows this widget to accept focus when clicked, or when navigated to. • Behavior  TooltipWidget: Tooltip widget to show when the user hovers over the widget with the mouse.  Is Enabled: Whether this widget can be modified interactively by the user.  Visiblity: Visibility of the widget.
  • 11. Visibility • Visible: Visible and hit-testable (can interact with cursor). (Default) • Collapsed: Not visible and takes up no space in the layout (obviously not hit-testable). • Hidden: Not visible but occupies layout space (obviously not hit- testable). • HitTestInvisible: Visible but not hit-testable (cannot interact with cursor) and children in the hierarchy (if any) are also not hit-testable. • SelfHitTestInvisible: Visible but not hit-testable (cannot interact with cursor), but doesn't affect hit-testing on children (if any).
  • 12. Canvas Panel Slots • Anchors • Position • Size • Alignment: Pivot point of the widget. • Size To Content • Z Order: Higher values appear on top. UMG Anchors
  • 13. Horizontal/Vertical Box Slots • Padding • Size  Auto: Only requests as much room as it needs based on the widgets desired size.  Fill: Greedily attempts to fill all available room based on the percentage value 0..1 • Horizontal Alignment • Vertical Alignment UMG Box Slot
  • 14. Text • Color & Opacity • Font • Min Desired Width • Justification • Wrapping UMG Text Block
  • 15. Fonts • Font Family • Typeface • Size • Outline Size & Color UMG Text Block
  • 16. Localization • Texts are referenced by namespace & key • String Tables with texts can be imported from/exported to CSV
  • 17. Brushes • Image • Image Size • Tint • Draw As  None: Don't do anything.  Box: Draw a 3x3 box where the sides and the middle stretch based on the margin.  Border: Draw a 3x3 border where the sides tile and the middle is empty.  Image: Draw an image, ignoring margin. • Tiling • Color & Opacity Slate Brush
  • 18. Blueprint Event Binding • In blueprints, you can bind events in two ways:  By linking them directly to a (custom) event in your event graph  By using a Create Event node referencing another event or function o In functions, only the second option is available.
  • 19. Button • Brushes for every state  Normal  Hovered  Pressed  Disabled • Hovered and Clicked events • Single child  e.g. text, image UMG Button
  • 20. Creating Re-Usable Widgets • Expose public variables for specifying your parameters (e.g. button text, style) • Implement PreConstruct event in your widget to apply settings • Allows for live updates in widget designer
  • 21. Traveling Traveling to another level can be achieved by calling Open Level: • Can specify either a level name or an IP address to travel to • May provide arbitrary options in form of a “travel URL”: DM-AwesomeMap?name=FastFragg0r • Options are automatically passed to be parsed by AGameMode::InitGame, for instance
  • 22. Traveling Reserved built-in travel options include: • listen: Loads the map as listen server. • restart: Causes Unreal to just reload the current level. • closed: Automatically appended by the engine to signal a failed connection attempt. • failed: Automatically appended by the engine to signal a failed connection attempt. • name: Player name to be set on the PlayerState. • spectatorOnly: Join as spectator player.
  • 23. Level Blueprints • Each level has its own dedicated level blueprint that behaves just like any other actor blueprint • Allows to directly reference actors placed in that level • There are various paradigms on how to deal with level blueprints…  Don’t use them at all  Use for inter-blueprint communication, only  Use them for everything
  • 24. Hint! You can specify whether or not to show a mouse cursor with the Show Mouse Cursor flag of your PlayerController.
  • 25. Assignment #5 – User Interface 1. Create an ingame HUD with a crosshair. 2. Add a health display to your HUD. 3. Bind input for showing an ingame scoreboard. 4. Create a very basic main menu level and UI.
  • 26. References • Epic Games. Slate Overview. https://docs.unrealengine.com/en- US/Programming/Slate/Overview/index.html, February 2020. • Epic Games. UMG UI Designer User Guide. https://docs.unrealengine.com/en- US/Engine/UMG/UserGuide/index.html, February 2020.
  • 27. See you next time! https://www.slideshare.net/npruehs https://github.com/npruehs/teaching- unreal-engine/releases/tag/assignment05 npruehs@outlook.com
  • 28. 5 Minute Review Session • What is the difference between Slate and UMG? • How can you create a very modular UI in UMG? • What do you need to do to show your widgets ingame? • Which kinds of panels do you know? • What’s the difference between collapsed and hidden visibility? • Which UI concept facilitates creating resolution-independent UIs? • How do your globalize your game? • How can you load another map while ingame?