SlideShare a Scribd company logo
The Slate UI Framework
Part 1: Introduction
Gerke Max Preussner
max.preussner@epicgames.com
UE1, UE2 and UE3
West Coast DevCon 2014: The Slate UI Framework (Part 1) - Introduction
Slate Design & Principles
Overview
Features
Concepts
Tools
Architecture
• Written entirely in C++
• Platform agnostic (works on mobile and consoles, too!)
• SlateCore module provides low-level functionality
• Slate module contains library of common UI widgets
• Does not require Engine or Editor modules
Current Use Cases
• Unreal Editor
• Standalone desktop applications
• Mobile applications
• In-game UI
Slate Design & Principles
Overview
Features
Concepts
Tools
Styling
• Customize the visual appearance of your UI
• Images (PNGs and Materials), Fonts, Paddings, etc.
• Customizable user-driven layouts
Input Handling
• Keyboard, mouse, joysticks, touch
• Key bindings support
Render Agnostic
• Supports both Engine renderer and standalone renderers
Large Widget Library
• Layout primitives, text boxes, buttons, images, menus, dialogs, message
boxes, navigation, notifications, dock tabs, list views, sliders, spinners, etc.
West Coast DevCon 2014: The Slate UI Framework (Part 1) - Introduction
Slate Design & Principles
Overview
Features
Concepts
Tools
Declarative Syntax
• Set of macros for declaring widget attributes
• Avoids layers of indirection
Composition
• Compose entire widget hierarchies in a few lines of code
• Uses fluent syntax for ease of use
• Preferred over widget inheritance
• Any child slot can contain any other widget type
• Makes it very easy to rearrange UIs in code
// Example custom button (some details omitted)
class STextButton
: public SCompoundWidget
{
public:
SLATE_BEGIN_ARGS(SMyButton )
{ }
// The label to display on the button.
SLATE_ATTRIBUTE(FText, Text)
// Called when the button is clicked.
SLATE_EVENT(FOnClicked, OnClicked)
SLATE_END_ARGS()
// Construct this button
void Construct( const FArguments& InArgs );
};
// Button implementation (some details omitted)
void STextButton::Construct ( const FArguments& InArgs )
{
ChildSlot
[
SNew(SButton)
.OnClicked(InArgs._OnClicked)
[
SNew(STextBlock)
.Font(FMyStyle::GetFontStyle(“TextButtonFont"))
.Text(InArgs._Text)
.ToolTipText(LOCTEXT(“TextButtonToolTip", “Click Me!"))
];
];
}
Slate Design & Principles
Overview
Features
Concepts
Tools
Widget Inspector
• Visually debug and analyze your UI
• Can jump directly to widget code in Visual Studio or XCode
UDK Remote
• iOS app for simulating touch devices on your PC
• Remote server is a plug-in (enabled by default)
• Primarily used for game development
West Coast DevCon 2014: The Slate UI Framework (Part 1) - Introduction
Demo
Demo
Going A Little Deeper
State Updates
Widget Roles
Anatomy
Attributes
Polling instead of Invalidation
• Avoids duplicate state data
• Exception: Non-trivial data models (use caches instead)
• Performance depends on number of visible widgets
Going A Little Deeper
State Updates
Widget Roles
Anatomy
Attributes
Fundamental Widget Types
• SCompoundWidget – Can have nested child widgets
• SLeafWidget – Does not contain child widgets
• SPanel – Base class for layout panels
Special Widgets
• SWidget – Root base class for all widgets (do not inherit!)
• SNullWidget – Empty default widget
User Widgets
• More efficient in terms of compile time
Going A Little Deeper
State Updates
Widget Roles
Anatomy
Attributes
Common Interfaces
• Arguments – Widget parameters that do not change
• Attributes – Parameters that are polled
• Event handlers – Usually named ‘OnSomeEvent’
Common Internals
• ComputeDesiredSize() - Calculates widget’s desired size
• ArrangeChildren() - Arranges children within allotted area
• OnPaint() – Draws the widget
Going A Little Deeper
State Updates
Widget Roles
Anatomy
Attributes
Common Attributes
• Enabled state, Visibility, Hit testability
• Tooltip Widget, Tooltip Text, Cursor Style
• Horizontal & Vertical Alignment , Padding
Attributes Can Be:
• Constants, i.e. IsEnabled(false)
• Delegate bindings,
i.e. IsEnabled(this, &SMyWidget::HandleIsEnabled)
Upcoming Features
Slate Optimizations
• Decreased impact on compilation time
• Split built-in widget library into multiple modules
Unreal Motion Graphics (UMG)
• Artist friendly WYSIWYG editor
• 2D transformation and animation with Sequencer
• Blueprint integration
• Better styling system
Questions?
Documentation, Tutorials and Help at:
• AnswerHub:
• Engine Documentation:
• Official Forums:
• Community Wiki:
• YouTube Videos:
• Community IRC:
Unreal Engine 4 Roadmap
• lmgtfy.com/?q=Unreal+engine+Trello+
http://answers.unrealengine.com
http://docs.unrealengine.com
http://forums.unrealengine.com
http://wiki.unrealengine.com
http://www.youtube.com/user/UnrealDevelopmentKit
#unrealengine on FreeNode

More Related Content

PPTX
East Coast DevCon 2014: The Slate UI Framework - Architecture & Tools
Gerke Max Preussner
 
PDF
The Basics of Unity - The Game Engine
OrisysIndia
 
PPTX
Introduction to Game Engine: Concepts & Components
Pouya Pournasir
 
PPTX
Unity 3D
gema123
 
PPTX
DevRookie 언리얼 에셋과 패키지.pptx
MUUMUMUMU
 
PDF
[IGC2018] 청강대 이득우 - 언리얼에디터확장을위해알아야할것들
강 민우
 
PPTX
Game Project / Working with Unity
Petri Lankoski
 
PDF
【Unity】Scriptable object 入門と活用例
Unity Technologies Japan K.K.
 
East Coast DevCon 2014: The Slate UI Framework - Architecture & Tools
Gerke Max Preussner
 
The Basics of Unity - The Game Engine
OrisysIndia
 
Introduction to Game Engine: Concepts & Components
Pouya Pournasir
 
Unity 3D
gema123
 
DevRookie 언리얼 에셋과 패키지.pptx
MUUMUMUMU
 
[IGC2018] 청강대 이득우 - 언리얼에디터확장을위해알아야할것들
강 민우
 
Game Project / Working with Unity
Petri Lankoski
 
【Unity】Scriptable object 入門と活用例
Unity Technologies Japan K.K.
 

What's hot (20)

PPTX
Flutter
Himanshu Singh
 
PPTX
Android AIDL Concept
Charile Tsai
 
PDF
Unity道場京都スペシャル トゥーンシェーディングとノンフォトリアリスティック風絵づくり入門_
Unity Technologies Japan K.K.
 
PDF
Ionic & Angular
Knoldus Inc.
 
PPTX
UnityでUI開発を高速化した件
Grenge, Inc.
 
PPTX
언리얼4 플레이어 컨트롤러의 이해.
Wuwon Yu
 
PPTX
Unreal engine4を使ったVRコンテンツ製作で 120%役に立つtips集+GDC情報をご紹介
エピック・ゲームズ・ジャパン Epic Games Japan
 
PPTX
FMX 2017: Extending Unreal Engine 4 with Plug-ins (Master Class)
Gerke Max Preussner
 
PDF
Mobile Game Development in Unity
Hakan Saglam
 
PDF
Android Operating System (Androrid OS)
Siddharth Belbase
 
PPT
Android presentation slide
APSMIND TECHNOLOGY PVT LTD.
 
PPTX
Introduction to Unity3D and Building your First Game
Sarah Sexton
 
PDF
[IGC 2017] 아마존 구승모 - 게임 엔진으로 서버 제작 및 운영까지
강 민우
 
PPTX
Unity 3D, A game engine
Md. Irteza rahman Masud
 
PPTX
Unity 3d Basics
Chaudhry Talha Waseem
 
PDF
Riderはいいぞ!
UnityTechnologiesJapan002
 
PPTX
Presentation on Android application
Atibur Rahman
 
PDF
UniRx完全に理解した
torisoup
 
PPT
TypeScript Presentation
Patrick John Pacaña
 
PPTX
UE4 MultiPlayer Online Deep Dive 基礎編2 -Traveling- (historia様ご講演) #ue4dd
エピック・ゲームズ・ジャパン Epic Games Japan
 
Android AIDL Concept
Charile Tsai
 
Unity道場京都スペシャル トゥーンシェーディングとノンフォトリアリスティック風絵づくり入門_
Unity Technologies Japan K.K.
 
Ionic & Angular
Knoldus Inc.
 
UnityでUI開発を高速化した件
Grenge, Inc.
 
언리얼4 플레이어 컨트롤러의 이해.
Wuwon Yu
 
Unreal engine4を使ったVRコンテンツ製作で 120%役に立つtips集+GDC情報をご紹介
エピック・ゲームズ・ジャパン Epic Games Japan
 
FMX 2017: Extending Unreal Engine 4 with Plug-ins (Master Class)
Gerke Max Preussner
 
Mobile Game Development in Unity
Hakan Saglam
 
Android Operating System (Androrid OS)
Siddharth Belbase
 
Android presentation slide
APSMIND TECHNOLOGY PVT LTD.
 
Introduction to Unity3D and Building your First Game
Sarah Sexton
 
[IGC 2017] 아마존 구승모 - 게임 엔진으로 서버 제작 및 운영까지
강 민우
 
Unity 3D, A game engine
Md. Irteza rahman Masud
 
Unity 3d Basics
Chaudhry Talha Waseem
 
Riderはいいぞ!
UnityTechnologiesJapan002
 
Presentation on Android application
Atibur Rahman
 
UniRx完全に理解した
torisoup
 
TypeScript Presentation
Patrick John Pacaña
 
UE4 MultiPlayer Online Deep Dive 基礎編2 -Traveling- (historia様ご講演) #ue4dd
エピック・ゲームズ・ジャパン Epic Games Japan
 
Ad

Viewers also liked (16)

PPTX
East Coast DevCon 2014: Concurrency & Parallelism in UE4 - Tips for programmi...
Gerke Max Preussner
 
PPTX
East Coast DevCon 2014: Engine Overview - A Programmer’s Glimpse at UE4
Gerke Max Preussner
 
PPT
Plug-ins & Third-Party SDKs in UE4
Gerke Max Preussner
 
PPTX
West Coast DevCon 2014: Build Automation - Epic’s Build Tools & Infrastructure
Gerke Max Preussner
 
PPTX
West Coast DevCon 2014: Game Programming in UE4 - Game Framework & Sample Pro...
Gerke Max Preussner
 
PPTX
East Coast DevCon 2014: Programming in UE4 - A Quick Orientation for Coders
Gerke Max Preussner
 
PPTX
West Coast DevCon 2014: Engine Overview - A Programmers Glimpse at UE4
Gerke Max Preussner
 
PPTX
East Coast DevCon 2014: Extensibility in UE4 - Customizing Your Games and the...
Gerke Max Preussner
 
PPTX
West Coast DevCon 2014: Programming in UE4 - A Quick Orientation for Coders
Gerke Max Preussner
 
PPTX
UE4 Twitch 2016 05-05: Unreal Message Bus Overview
Gerke Max Preussner
 
PPTX
West Coast DevCon 2014: The Slate UI Framework (Part 2) - Game UI & Unreal Mo...
Gerke Max Preussner
 
PPTX
East Coast DevCon 2014: Game Programming in UE4 - Game Framework & Sample Pro...
Gerke Max Preussner
 
PPTX
West Coast DevCon 2014: Extensibility in UE4 - Customizing Your Games and the...
Gerke Max Preussner
 
PPTX
West Coast DevCon 2014: Concurrency & Parallelism in UE4 - Tips for programmi...
Gerke Max Preussner
 
PPTX
GDCE 2015: Blueprint Components to C++
Gerke Max Preussner
 
PPTX
GDC Europe 2014: Unreal Engine 4 for Programmers - Lessons Learned & Things t...
Gerke Max Preussner
 
East Coast DevCon 2014: Concurrency & Parallelism in UE4 - Tips for programmi...
Gerke Max Preussner
 
East Coast DevCon 2014: Engine Overview - A Programmer’s Glimpse at UE4
Gerke Max Preussner
 
Plug-ins & Third-Party SDKs in UE4
Gerke Max Preussner
 
West Coast DevCon 2014: Build Automation - Epic’s Build Tools & Infrastructure
Gerke Max Preussner
 
West Coast DevCon 2014: Game Programming in UE4 - Game Framework & Sample Pro...
Gerke Max Preussner
 
East Coast DevCon 2014: Programming in UE4 - A Quick Orientation for Coders
Gerke Max Preussner
 
West Coast DevCon 2014: Engine Overview - A Programmers Glimpse at UE4
Gerke Max Preussner
 
East Coast DevCon 2014: Extensibility in UE4 - Customizing Your Games and the...
Gerke Max Preussner
 
West Coast DevCon 2014: Programming in UE4 - A Quick Orientation for Coders
Gerke Max Preussner
 
UE4 Twitch 2016 05-05: Unreal Message Bus Overview
Gerke Max Preussner
 
West Coast DevCon 2014: The Slate UI Framework (Part 2) - Game UI & Unreal Mo...
Gerke Max Preussner
 
East Coast DevCon 2014: Game Programming in UE4 - Game Framework & Sample Pro...
Gerke Max Preussner
 
West Coast DevCon 2014: Extensibility in UE4 - Customizing Your Games and the...
Gerke Max Preussner
 
West Coast DevCon 2014: Concurrency & Parallelism in UE4 - Tips for programmi...
Gerke Max Preussner
 
GDCE 2015: Blueprint Components to C++
Gerke Max Preussner
 
GDC Europe 2014: Unreal Engine 4 for Programmers - Lessons Learned & Things t...
Gerke Max Preussner
 
Ad

Similar to West Coast DevCon 2014: The Slate UI Framework (Part 1) - Introduction (20)

PDF
Unreal Engine Basics 05 - User Interface
Nick Pruehs
 
PDF
Qt Developer Days 2009 Keynote - Portable UIs
account inactive
 
PPT
Sense and sense ability - TU100 13J
Nigel Gibson
 
PDF
Xcode, Basics and Beyond
rsebbe
 
PDF
200910 - iPhone at OOPSLA
Javier Gonzalez-Sanchez
 
PDF
Hybrid Apps (Native + Web) using WebKit
Ariya Hidayat
 
PDF
Hybrid Apps (Native + Web) using WebKit
Ariya Hidayat
 
PDF
COMP 4026 Lecture4: Processing and Advanced Interface Technology
Mark Billinghurst
 
PPTX
How to Build & Develop Responsive Open Learning Environments with the ROLE SDK
Dominik Renzel
 
PDF
ICS3211 Lecture 08 2020
Vanessa Camilleri
 
PPTX
How to Build & Develop Responsive Open Learning Environments with the ROLE SDK
Dominik Renzel
 
PPT
Model-based engineering of multi-platform, synchronous & collaborative UIs
Jean Vanderdonckt
 
PPT
Sense and Sense Ability
Nigel Gibson
 
PPTX
Rock solid UI modeling using annotation processing - CodeGeneration 2013
gdigugli
 
PDF
Hybrid Apps (Native + Web) via QtWebKit
Ariya Hidayat
 
PDF
JavaFX 1.0 SDK Aquarium Paris
Alexis Moussine-Pouchkine
 
PDF
1a8 parrallel ui rendering
AEGIS-ACCESSIBLE Projects
 
PDF
200810 - iPhone Tutorial
Javier Gonzalez-Sanchez
 
PDF
I pad uicatalog_lesson02
Rich Helton
 
Unreal Engine Basics 05 - User Interface
Nick Pruehs
 
Qt Developer Days 2009 Keynote - Portable UIs
account inactive
 
Sense and sense ability - TU100 13J
Nigel Gibson
 
Xcode, Basics and Beyond
rsebbe
 
200910 - iPhone at OOPSLA
Javier Gonzalez-Sanchez
 
Hybrid Apps (Native + Web) using WebKit
Ariya Hidayat
 
Hybrid Apps (Native + Web) using WebKit
Ariya Hidayat
 
COMP 4026 Lecture4: Processing and Advanced Interface Technology
Mark Billinghurst
 
How to Build & Develop Responsive Open Learning Environments with the ROLE SDK
Dominik Renzel
 
ICS3211 Lecture 08 2020
Vanessa Camilleri
 
How to Build & Develop Responsive Open Learning Environments with the ROLE SDK
Dominik Renzel
 
Model-based engineering of multi-platform, synchronous & collaborative UIs
Jean Vanderdonckt
 
Sense and Sense Ability
Nigel Gibson
 
Rock solid UI modeling using annotation processing - CodeGeneration 2013
gdigugli
 
Hybrid Apps (Native + Web) via QtWebKit
Ariya Hidayat
 
JavaFX 1.0 SDK Aquarium Paris
Alexis Moussine-Pouchkine
 
1a8 parrallel ui rendering
AEGIS-ACCESSIBLE Projects
 
200810 - iPhone Tutorial
Javier Gonzalez-Sanchez
 
I pad uicatalog_lesson02
Rich Helton
 

Recently uploaded (20)

PDF
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
 
PPTX
Can You Build Dashboards Using Open Source Visualization Tool.pptx
Varsha Nayak
 
PDF
Salesforce Implementation Services Provider.pdf
VALiNTRY360
 
PDF
49785682629390197565_LRN3014_Migrating_the_Beast.pdf
Abilash868456
 
PPT
Activate_Methodology_Summary presentatio
annapureddyn
 
PDF
WatchTraderHub - Watch Dealer software with inventory management and multi-ch...
WatchDealer Pavel
 
PPTX
classification of computer and basic part of digital computer
ravisinghrajpurohit3
 
PPTX
Odoo Integration Services by Candidroot Solutions
CandidRoot Solutions Private Limited
 
PPT
Why Reliable Server Maintenance Service in New York is Crucial for Your Business
Sam Vohra
 
PDF
On Software Engineers' Productivity - Beyond Misleading Metrics
Romén Rodríguez-Gil
 
DOCX
Can You Build Dashboards Using Open Source Visualization Tool.docx
Varsha Nayak
 
PPTX
Explanation about Structures in C language.pptx
Veeral Rathod
 
PPTX
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
PPTX
oapresentation.pptx
mehatdhavalrajubhai
 
PPTX
ConcordeApp: Engineering Global Impact & Unlocking Billions in Event ROI with AI
chastechaste14
 
PPTX
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
PDF
An Experience-Based Look at AI Lead Generation Pricing, Features & B2B Results
Thomas albart
 
PDF
What to consider before purchasing Microsoft 365 Business Premium_PDF.pdf
Q-Advise
 
PDF
Key Features to Look for in Arizona App Development Services
Net-Craft.com
 
PDF
Teaching Reproducibility and Embracing Variability: From Floating-Point Exper...
University of Rennes, INSA Rennes, Inria/IRISA, CNRS
 
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
 
Can You Build Dashboards Using Open Source Visualization Tool.pptx
Varsha Nayak
 
Salesforce Implementation Services Provider.pdf
VALiNTRY360
 
49785682629390197565_LRN3014_Migrating_the_Beast.pdf
Abilash868456
 
Activate_Methodology_Summary presentatio
annapureddyn
 
WatchTraderHub - Watch Dealer software with inventory management and multi-ch...
WatchDealer Pavel
 
classification of computer and basic part of digital computer
ravisinghrajpurohit3
 
Odoo Integration Services by Candidroot Solutions
CandidRoot Solutions Private Limited
 
Why Reliable Server Maintenance Service in New York is Crucial for Your Business
Sam Vohra
 
On Software Engineers' Productivity - Beyond Misleading Metrics
Romén Rodríguez-Gil
 
Can You Build Dashboards Using Open Source Visualization Tool.docx
Varsha Nayak
 
Explanation about Structures in C language.pptx
Veeral Rathod
 
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
oapresentation.pptx
mehatdhavalrajubhai
 
ConcordeApp: Engineering Global Impact & Unlocking Billions in Event ROI with AI
chastechaste14
 
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
An Experience-Based Look at AI Lead Generation Pricing, Features & B2B Results
Thomas albart
 
What to consider before purchasing Microsoft 365 Business Premium_PDF.pdf
Q-Advise
 
Key Features to Look for in Arizona App Development Services
Net-Craft.com
 
Teaching Reproducibility and Embracing Variability: From Floating-Point Exper...
University of Rennes, INSA Rennes, Inria/IRISA, CNRS
 

West Coast DevCon 2014: The Slate UI Framework (Part 1) - Introduction

  • 1. The Slate UI Framework Part 1: Introduction Gerke Max Preussner [email protected]
  • 4. Slate Design & Principles Overview Features Concepts Tools Architecture • Written entirely in C++ • Platform agnostic (works on mobile and consoles, too!) • SlateCore module provides low-level functionality • Slate module contains library of common UI widgets • Does not require Engine or Editor modules Current Use Cases • Unreal Editor • Standalone desktop applications • Mobile applications • In-game UI
  • 5. Slate Design & Principles Overview Features Concepts Tools Styling • Customize the visual appearance of your UI • Images (PNGs and Materials), Fonts, Paddings, etc. • Customizable user-driven layouts Input Handling • Keyboard, mouse, joysticks, touch • Key bindings support Render Agnostic • Supports both Engine renderer and standalone renderers Large Widget Library • Layout primitives, text boxes, buttons, images, menus, dialogs, message boxes, navigation, notifications, dock tabs, list views, sliders, spinners, etc.
  • 7. Slate Design & Principles Overview Features Concepts Tools Declarative Syntax • Set of macros for declaring widget attributes • Avoids layers of indirection Composition • Compose entire widget hierarchies in a few lines of code • Uses fluent syntax for ease of use • Preferred over widget inheritance • Any child slot can contain any other widget type • Makes it very easy to rearrange UIs in code
  • 8. // Example custom button (some details omitted) class STextButton : public SCompoundWidget { public: SLATE_BEGIN_ARGS(SMyButton ) { } // The label to display on the button. SLATE_ATTRIBUTE(FText, Text) // Called when the button is clicked. SLATE_EVENT(FOnClicked, OnClicked) SLATE_END_ARGS() // Construct this button void Construct( const FArguments& InArgs ); }; // Button implementation (some details omitted) void STextButton::Construct ( const FArguments& InArgs ) { ChildSlot [ SNew(SButton) .OnClicked(InArgs._OnClicked) [ SNew(STextBlock) .Font(FMyStyle::GetFontStyle(“TextButtonFont")) .Text(InArgs._Text) .ToolTipText(LOCTEXT(“TextButtonToolTip", “Click Me!")) ]; ]; }
  • 9. Slate Design & Principles Overview Features Concepts Tools Widget Inspector • Visually debug and analyze your UI • Can jump directly to widget code in Visual Studio or XCode UDK Remote • iOS app for simulating touch devices on your PC • Remote server is a plug-in (enabled by default) • Primarily used for game development
  • 11. Demo
  • 12. Demo
  • 13. Going A Little Deeper State Updates Widget Roles Anatomy Attributes Polling instead of Invalidation • Avoids duplicate state data • Exception: Non-trivial data models (use caches instead) • Performance depends on number of visible widgets
  • 14. Going A Little Deeper State Updates Widget Roles Anatomy Attributes Fundamental Widget Types • SCompoundWidget – Can have nested child widgets • SLeafWidget – Does not contain child widgets • SPanel – Base class for layout panels Special Widgets • SWidget – Root base class for all widgets (do not inherit!) • SNullWidget – Empty default widget User Widgets • More efficient in terms of compile time
  • 15. Going A Little Deeper State Updates Widget Roles Anatomy Attributes Common Interfaces • Arguments – Widget parameters that do not change • Attributes – Parameters that are polled • Event handlers – Usually named ‘OnSomeEvent’ Common Internals • ComputeDesiredSize() - Calculates widget’s desired size • ArrangeChildren() - Arranges children within allotted area • OnPaint() – Draws the widget
  • 16. Going A Little Deeper State Updates Widget Roles Anatomy Attributes Common Attributes • Enabled state, Visibility, Hit testability • Tooltip Widget, Tooltip Text, Cursor Style • Horizontal & Vertical Alignment , Padding Attributes Can Be: • Constants, i.e. IsEnabled(false) • Delegate bindings, i.e. IsEnabled(this, &SMyWidget::HandleIsEnabled)
  • 17. Upcoming Features Slate Optimizations • Decreased impact on compilation time • Split built-in widget library into multiple modules Unreal Motion Graphics (UMG) • Artist friendly WYSIWYG editor • 2D transformation and animation with Sequencer • Blueprint integration • Better styling system
  • 18. Questions? Documentation, Tutorials and Help at: • AnswerHub: • Engine Documentation: • Official Forums: • Community Wiki: • YouTube Videos: • Community IRC: Unreal Engine 4 Roadmap • lmgtfy.com/?q=Unreal+engine+Trello+ http://answers.unrealengine.com http://docs.unrealengine.com http://forums.unrealengine.com http://wiki.unrealengine.com http://www.youtube.com/user/UnrealDevelopmentKit #unrealengine on FreeNode

Editor's Notes

  • #2: Prepared and presented by Gerke Max Preussner for West Coast MiniDevCon 2014, July 21-24th Email [email protected] in case of comments, questions or suggestions or visit our AnswerHub at http://answers.unrealengine.com
  • #3: In previous versions of Unreal Engine we used different third party UI frameworks, such as MFC, wxWidgets, Windows Forms and WPF. All these user interfaces were complicated, cluttered and not very customizable. In Unreal Engine 4 we have drastically changed how we approach user interfaces. We want our programs to be more intuitive, customizable, extensible and modern.
  • #4: The result of this effort is our own UI framework called Slate. Here you can see a screenshot of the latest Unreal Editor, which is entirely done in Slate.
  • #5: Slate is written entirely in C++ and runs on all platforms supported by Unreal Engine 4. We used it for the Unreal Editor, standalone desktop applications and tools, as well mobile apps. It can also be used for in-game UI, but I will talk about that in the second part of this presentation. Slate used to be just one C++ module, but we recently split it into two, and we may split up further in the near future.
  • #6: The appearance of widgets can be styled with a C++ based style system. We are currently working on making it better as part of UMG. The core of Slate takes care of all user input and translates it into events that your application can consume. Slate can render its UI with the Engine and without. Of course, Slate also comes with a large library of common UI widgets.
  • #7: We have a special application called Slate Viewer. It is a great way to learn about Slate. It shows the look and feel of all the different built-in widget types. It also demonstrates the built-in tab docking framework and the many different ways to create layouts.
  • #8: The two main concepts in Slate programming are Declarative Syntax and Composition. Declarative syntax is our way for creating UI widgets in C++ code. It is very compact and easy to read. Other UI frameworks heavily rely on widget inheritance, but Slate uses composition instead.
  • #9: Here is a simple contrived example of these two concepts. On the left we declare a new button widget using Slate’s declarative syntax. The first macro declares an attribute for the button text, and the second macro declares an event delegate for when the button is clicked. There are several other macros available for declaring other types of widget attributes. On the right we see the button’s construction code. Notice that STextButton inherits from SCompoundWidget, one of the fundamental widget types, and we use composition to populate the button’s content. In this case we are simply wrapping an SButton widget that contains an STextBlock as its content, and we forward any widget arguments that may have been passed in.
  • #10: We also have a couple tools to help you develop your Slate based user interfaces. Slate comes with a cool visual debugging tool called Widget Inspector – I will demo it shortly. There is also an app for iOS that allows you to simulate touch input while developing your game or application on a desktop PC.
  • #11: You can get the UDK Remote app for iOS on the Apple App Store. We will soon rewrite this app in Slate, so it also works on Android.
  • #12: [Widget Reflector Demo]
  • #13: With a little bit of practice you will be able to visualize in your mind what Slate code will look like when rendered. On the top left we see the Color Picker widget. Below is the Widget Reflector with focus on the Color Wheel widget inside the color picker. Notice how all three representations show the same hierarchical relationships (blue, red, green boxes).
  • #14: For updating its UI, Slate uses Polling instead of Invalidation. This avoid duplication of UI state data. It also means you have to be careful about the amount of work you are doing inside callback delegates. You can see in example for the color wheel that all properties are bound to delegates. The non-event delegates will be executed every tick.
  • #15: Although we mostly use composition for creating new widgets, SlateCore defines three truly fundamental widget types that are meant to be inherited. Most of your custom widgets will inherit from SCompoundWidget, or SLeafWidget if they have no children. Child slots must always contain a valid widget. SNullWidget is used to fill empty slots. User widgets were recently added and are still somewhat experimental.
  • #16: Widgets share a common anatomy. A widget’s appearance is usually controlled with Arguments and Attributes. You can also use setter and getter functions if you prefer. All widgets contain functions to compute their desired size, arrange their child widgets (if any) and paint themselves.
  • #18: We continue to make improvements to Slate. The biggest and most anticipated upcoming feature is Unreal Motion Graphics. I will talk about it in the second part of this talk, so if you want to know more, please stay in the room.
  • #19: The easiest way to learn more about Slate is to check out our extensive online documentation, which is available for free to everyone. Are there any questions right now?