SlideShare ist ein Scribd-Unternehmen logo
1 von 24
The Slate UI Framework
Architecture & Tools
Gerke Max Preussner
max.preussner@epicgames.com
UE1, UE2 and UE3
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.
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 Gallery
• Demonstrates all available Slate widgets and layouts
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
Demo
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
SWidget
SCompoundWidget SLeafWidget SPanel
SNullWidget
SBox
SCanvas
SBorder SImage
SButton
SViewport
STextBlock
SVirtualJoystick SGridPanel
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)
• Lambdas are now supported, too!
In-Game UI
HUD Canvas
VP Widgets
Game Menus
FCanvas
• Low-level C++ API for drawing directly to the screen
• Has been part of Unreal Engine for many years
• All functions are in FCanvas class
• DrawText(), DrawTexture(), DrawTile(), etc.
• Use AHUD.Canvas to access the canvas object
HHitProxy
• Provides basic interaction support for FCanvas
• Create one hit proxy per interactive object
• Hit proxy ID is sent to GPU for per-pixel hit tests
In-Game UI
HUD Canvas
VP Widgets
Game Menus
UGameViewportClient
• Allows usage of Slate widgets inside game view port
• Use all features of Slate (except SWindow)
• Add/RemoveViewportWidgetContent()
Things to keep in mind
• All added widgets will be layered on top of each other (SOverlay)
• Widgets should use TWeakObjPtr for UObject references
In-Game UI
HUD Canvas
VP Widgets
Game Menus
The Hard Way
• Use FCanvas to draw your own menus
• Not recommended
The Custom Way
• Use HUD Widgets to create any menu layout
The Lazy Way
• Use GameMenuBuilder for paged menus
• FGameMenuPage - Single menu page
• FGameMenuItem - An option in a menu page
• Can be customized and styled
• Mostly used for settings screens
What’s New in 4.6?
Slate Improvements
• Decreased impact on compilation time
• Split built-in widget library into multiple modules
• Named slots
Unreal Motion Graphics (UMG)
• Artist friendly WYSIWYG editor
• 2D transformation and animation with Sequencer
• Blueprint integration & scripting
• Better styling system (work in progress)
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

Weitere ähnliche Inhalte

Was ist angesagt?

Intro to unreal with framework and vr
Intro to unreal with framework and vrIntro to unreal with framework and vr
Intro to unreal with framework and vrLuis Cataldi
 
Game Engine Architecture
Game Engine ArchitectureGame Engine Architecture
Game Engine ArchitectureAttila Jenei
 
Unreal Open Day 2017 Optimize in Mobile UI
Unreal Open Day 2017 Optimize in Mobile UIUnreal Open Day 2017 Optimize in Mobile UI
Unreal Open Day 2017 Optimize in Mobile UIEpic Games China
 
Player Traversal Mechanics in the Vast World of Horizon Zero Dawn
Player Traversal Mechanics in the Vast World of Horizon Zero DawnPlayer Traversal Mechanics in the Vast World of Horizon Zero Dawn
Player Traversal Mechanics in the Vast World of Horizon Zero DawnGuerrilla
 
ガルガンチュア on Oculus Quest - 72FPSへの挑戦 -
ガルガンチュア on Oculus Quest - 72FPSへの挑戦 -ガルガンチュア on Oculus Quest - 72FPSへの挑戦 -
ガルガンチュア on Oculus Quest - 72FPSへの挑戦 -Takehito Gondo
 
PRESENTATION ON Game Engine
PRESENTATION ON Game EnginePRESENTATION ON Game Engine
PRESENTATION ON Game EngineDiksha Bhargava
 
DevRookie 언리얼 에셋과 패키지.pptx
DevRookie 언리얼 에셋과 패키지.pptxDevRookie 언리얼 에셋과 패키지.pptx
DevRookie 언리얼 에셋과 패키지.pptxMUUMUMUMU
 
Introduction to Game Engine: Concepts & Components
Introduction to Game Engine: Concepts & ComponentsIntroduction to Game Engine: Concepts & Components
Introduction to Game Engine: Concepts & ComponentsPouya Pournasir
 
[NDC08] 최적화와 프로파일링 - 송창규
[NDC08] 최적화와 프로파일링 - 송창규[NDC08] 최적화와 프로파일링 - 송창규
[NDC08] 최적화와 프로파일링 - 송창규ChangKyu Song
 
Unreal Engine Basics 03 - Gameplay
Unreal Engine Basics 03 - GameplayUnreal Engine Basics 03 - Gameplay
Unreal Engine Basics 03 - GameplayNick Pruehs
 
Game development
Game developmentGame development
Game developmentreittes
 
Plug-ins & Third-Party SDKs in UE4
Plug-ins & Third-Party SDKs in UE4Plug-ins & Third-Party SDKs in UE4
Plug-ins & Third-Party SDKs in UE4Gerke Max Preussner
 
「原神」におけるコンソールプラットフォーム開発
「原神」におけるコンソールプラットフォーム開発「原神」におけるコンソールプラットフォーム開発
「原神」におけるコンソールプラットフォーム開発Unity Technologies Japan K.K.
 
Unreal Engine Basics 02 - Unreal Editor
Unreal Engine Basics 02 - Unreal EditorUnreal Engine Basics 02 - Unreal Editor
Unreal Engine Basics 02 - Unreal EditorNick Pruehs
 
Rendering Technologies from Crysis 3 (GDC 2013)
Rendering Technologies from Crysis 3 (GDC 2013)Rendering Technologies from Crysis 3 (GDC 2013)
Rendering Technologies from Crysis 3 (GDC 2013)Tiago Sousa
 

Was ist angesagt? (20)

Intro to unreal with framework and vr
Intro to unreal with framework and vrIntro to unreal with framework and vr
Intro to unreal with framework and vr
 
Game Engine Architecture
Game Engine ArchitectureGame Engine Architecture
Game Engine Architecture
 
Unreal Open Day 2017 Optimize in Mobile UI
Unreal Open Day 2017 Optimize in Mobile UIUnreal Open Day 2017 Optimize in Mobile UI
Unreal Open Day 2017 Optimize in Mobile UI
 
Niagara In UE4
Niagara In UE4Niagara In UE4
Niagara In UE4
 
Player Traversal Mechanics in the Vast World of Horizon Zero Dawn
Player Traversal Mechanics in the Vast World of Horizon Zero DawnPlayer Traversal Mechanics in the Vast World of Horizon Zero Dawn
Player Traversal Mechanics in the Vast World of Horizon Zero Dawn
 
ガルガンチュア on Oculus Quest - 72FPSへの挑戦 -
ガルガンチュア on Oculus Quest - 72FPSへの挑戦 -ガルガンチュア on Oculus Quest - 72FPSへの挑戦 -
ガルガンチュア on Oculus Quest - 72FPSへの挑戦 -
 
PRESENTATION ON Game Engine
PRESENTATION ON Game EnginePRESENTATION ON Game Engine
PRESENTATION ON Game Engine
 
DevRookie 언리얼 에셋과 패키지.pptx
DevRookie 언리얼 에셋과 패키지.pptxDevRookie 언리얼 에셋과 패키지.pptx
DevRookie 언리얼 에셋과 패키지.pptx
 
Introduction to Game Engine: Concepts & Components
Introduction to Game Engine: Concepts & ComponentsIntroduction to Game Engine: Concepts & Components
Introduction to Game Engine: Concepts & Components
 
Press Button, Drink Coffee : An Overview of UE4 build pipeline and maintenance
Press Button, Drink Coffee : An Overview of UE4 build pipeline and maintenancePress Button, Drink Coffee : An Overview of UE4 build pipeline and maintenance
Press Button, Drink Coffee : An Overview of UE4 build pipeline and maintenance
 
[NDC08] 최적화와 프로파일링 - 송창규
[NDC08] 최적화와 프로파일링 - 송창규[NDC08] 최적화와 프로파일링 - 송창규
[NDC08] 최적화와 프로파일링 - 송창규
 
Unreal Engine Basics 03 - Gameplay
Unreal Engine Basics 03 - GameplayUnreal Engine Basics 03 - Gameplay
Unreal Engine Basics 03 - Gameplay
 
Localization feature of ue4
Localization feature of ue4Localization feature of ue4
Localization feature of ue4
 
Game development
Game developmentGame development
Game development
 
UE4のスレッドの流れと Input Latency改善の仕組み
UE4のスレッドの流れとInput Latency改善の仕組みUE4のスレッドの流れとInput Latency改善の仕組み
UE4のスレッドの流れと Input Latency改善の仕組み
 
Plug-ins & Third-Party SDKs in UE4
Plug-ins & Third-Party SDKs in UE4Plug-ins & Third-Party SDKs in UE4
Plug-ins & Third-Party SDKs in UE4
 
「原神」におけるコンソールプラットフォーム開発
「原神」におけるコンソールプラットフォーム開発「原神」におけるコンソールプラットフォーム開発
「原神」におけるコンソールプラットフォーム開発
 
Unreal Engine Basics 02 - Unreal Editor
Unreal Engine Basics 02 - Unreal EditorUnreal Engine Basics 02 - Unreal Editor
Unreal Engine Basics 02 - Unreal Editor
 
ローカライズって何?(UE4 Localization Deep Dive)
ローカライズって何?(UE4 Localization Deep Dive)ローカライズって何?(UE4 Localization Deep Dive)
ローカライズって何?(UE4 Localization Deep Dive)
 
Rendering Technologies from Crysis 3 (GDC 2013)
Rendering Technologies from Crysis 3 (GDC 2013)Rendering Technologies from Crysis 3 (GDC 2013)
Rendering Technologies from Crysis 3 (GDC 2013)
 

Andere mochten auch

East Coast DevCon 2014: Extensibility in UE4 - Customizing Your Games and the...
East Coast DevCon 2014: Extensibility in UE4 - Customizing Your Games and the...East Coast DevCon 2014: Extensibility in UE4 - Customizing Your Games and the...
East Coast DevCon 2014: Extensibility in UE4 - Customizing Your Games and the...Gerke Max Preussner
 
West Coast DevCon 2014: Build Automation - Epic’s Build Tools & Infrastructure
West Coast DevCon 2014: Build Automation - Epic’s Build Tools & InfrastructureWest Coast DevCon 2014: Build Automation - Epic’s Build Tools & Infrastructure
West Coast DevCon 2014: Build Automation - Epic’s Build Tools & InfrastructureGerke Max Preussner
 
West Coast DevCon 2014: Extensibility in UE4 - Customizing Your Games and the...
West Coast DevCon 2014: Extensibility in UE4 - Customizing Your Games and the...West Coast DevCon 2014: Extensibility in UE4 - Customizing Your Games and the...
West Coast DevCon 2014: Extensibility in UE4 - Customizing Your Games and the...Gerke Max Preussner
 
West Coast DevCon 2014: The Slate UI Framework (Part 2) - Game UI & Unreal Mo...
West Coast DevCon 2014: The Slate UI Framework (Part 2) - Game UI & Unreal Mo...West Coast DevCon 2014: The Slate UI Framework (Part 2) - Game UI & Unreal Mo...
West Coast DevCon 2014: The Slate UI Framework (Part 2) - Game UI & Unreal Mo...Gerke Max Preussner
 
East Coast DevCon 2014: Programming in UE4 - A Quick Orientation for Coders
East Coast DevCon 2014: Programming in UE4 - A Quick Orientation for CodersEast Coast DevCon 2014: Programming in UE4 - A Quick Orientation for Coders
East Coast DevCon 2014: Programming in UE4 - A Quick Orientation for CodersGerke Max Preussner
 
West Coast DevCon 2014: Concurrency & Parallelism in UE4 - Tips for programmi...
West Coast DevCon 2014: Concurrency & Parallelism in UE4 - Tips for programmi...West Coast DevCon 2014: Concurrency & Parallelism in UE4 - Tips for programmi...
West Coast DevCon 2014: Concurrency & Parallelism in UE4 - Tips for programmi...Gerke Max Preussner
 
East Coast DevCon 2014: Game Programming in UE4 - Game Framework & Sample Pro...
East Coast DevCon 2014: Game Programming in UE4 - Game Framework & Sample Pro...East Coast DevCon 2014: Game Programming in UE4 - Game Framework & Sample Pro...
East Coast DevCon 2014: Game Programming in UE4 - Game Framework & Sample Pro...Gerke Max Preussner
 
West Coast DevCon 2014: Engine Overview - A Programmers Glimpse at UE4
West Coast DevCon 2014: Engine Overview - A Programmers Glimpse at UE4West Coast DevCon 2014: Engine Overview - A Programmers Glimpse at UE4
West Coast DevCon 2014: Engine Overview - A Programmers Glimpse at UE4Gerke Max Preussner
 
East Coast DevCon 2014: Engine Overview - A Programmer’s Glimpse at UE4
East Coast DevCon 2014: Engine Overview - A Programmer’s Glimpse at UE4East Coast DevCon 2014: Engine Overview - A Programmer’s Glimpse at UE4
East Coast DevCon 2014: Engine Overview - A Programmer’s Glimpse at UE4Gerke Max Preussner
 
West Coast DevCon 2014: Programming in UE4 - A Quick Orientation for Coders
West Coast DevCon 2014: Programming in UE4 - A Quick Orientation for CodersWest Coast DevCon 2014: Programming in UE4 - A Quick Orientation for Coders
West Coast DevCon 2014: Programming in UE4 - A Quick Orientation for CodersGerke Max Preussner
 
UE4 Twitch 2016 05-05: Unreal Message Bus Overview
UE4 Twitch 2016 05-05: Unreal Message Bus OverviewUE4 Twitch 2016 05-05: Unreal Message Bus Overview
UE4 Twitch 2016 05-05: Unreal Message Bus OverviewGerke Max Preussner
 
GDCE 2015: Blueprint Components to C++
GDCE 2015: Blueprint Components to C++GDCE 2015: Blueprint Components to C++
GDCE 2015: Blueprint Components to C++Gerke Max Preussner
 
FMX 2017: Extending Unreal Engine 4 with Plug-ins (Master Class)
FMX 2017: Extending Unreal Engine 4 with Plug-ins (Master Class)FMX 2017: Extending Unreal Engine 4 with Plug-ins (Master Class)
FMX 2017: Extending Unreal Engine 4 with Plug-ins (Master Class)Gerke Max Preussner
 

Andere mochten auch (13)

East Coast DevCon 2014: Extensibility in UE4 - Customizing Your Games and the...
East Coast DevCon 2014: Extensibility in UE4 - Customizing Your Games and the...East Coast DevCon 2014: Extensibility in UE4 - Customizing Your Games and the...
East Coast DevCon 2014: Extensibility in UE4 - Customizing Your Games and the...
 
West Coast DevCon 2014: Build Automation - Epic’s Build Tools & Infrastructure
West Coast DevCon 2014: Build Automation - Epic’s Build Tools & InfrastructureWest Coast DevCon 2014: Build Automation - Epic’s Build Tools & Infrastructure
West Coast DevCon 2014: Build Automation - Epic’s Build Tools & Infrastructure
 
West Coast DevCon 2014: Extensibility in UE4 - Customizing Your Games and the...
West Coast DevCon 2014: Extensibility in UE4 - Customizing Your Games and the...West Coast DevCon 2014: Extensibility in UE4 - Customizing Your Games and the...
West Coast DevCon 2014: Extensibility in UE4 - Customizing Your Games and the...
 
West Coast DevCon 2014: The Slate UI Framework (Part 2) - Game UI & Unreal Mo...
West Coast DevCon 2014: The Slate UI Framework (Part 2) - Game UI & Unreal Mo...West Coast DevCon 2014: The Slate UI Framework (Part 2) - Game UI & Unreal Mo...
West Coast DevCon 2014: The Slate UI Framework (Part 2) - Game UI & Unreal Mo...
 
East Coast DevCon 2014: Programming in UE4 - A Quick Orientation for Coders
East Coast DevCon 2014: Programming in UE4 - A Quick Orientation for CodersEast Coast DevCon 2014: Programming in UE4 - A Quick Orientation for Coders
East Coast DevCon 2014: Programming in UE4 - A Quick Orientation for Coders
 
West Coast DevCon 2014: Concurrency & Parallelism in UE4 - Tips for programmi...
West Coast DevCon 2014: Concurrency & Parallelism in UE4 - Tips for programmi...West Coast DevCon 2014: Concurrency & Parallelism in UE4 - Tips for programmi...
West Coast DevCon 2014: Concurrency & Parallelism in UE4 - Tips for programmi...
 
East Coast DevCon 2014: Game Programming in UE4 - Game Framework & Sample Pro...
East Coast DevCon 2014: Game Programming in UE4 - Game Framework & Sample Pro...East Coast DevCon 2014: Game Programming in UE4 - Game Framework & Sample Pro...
East Coast DevCon 2014: Game Programming in UE4 - Game Framework & Sample Pro...
 
West Coast DevCon 2014: Engine Overview - A Programmers Glimpse at UE4
West Coast DevCon 2014: Engine Overview - A Programmers Glimpse at UE4West Coast DevCon 2014: Engine Overview - A Programmers Glimpse at UE4
West Coast DevCon 2014: Engine Overview - A Programmers Glimpse at UE4
 
East Coast DevCon 2014: Engine Overview - A Programmer’s Glimpse at UE4
East Coast DevCon 2014: Engine Overview - A Programmer’s Glimpse at UE4East Coast DevCon 2014: Engine Overview - A Programmer’s Glimpse at UE4
East Coast DevCon 2014: Engine Overview - A Programmer’s Glimpse at UE4
 
West Coast DevCon 2014: Programming in UE4 - A Quick Orientation for Coders
West Coast DevCon 2014: Programming in UE4 - A Quick Orientation for CodersWest Coast DevCon 2014: Programming in UE4 - A Quick Orientation for Coders
West Coast DevCon 2014: Programming in UE4 - A Quick Orientation for Coders
 
UE4 Twitch 2016 05-05: Unreal Message Bus Overview
UE4 Twitch 2016 05-05: Unreal Message Bus OverviewUE4 Twitch 2016 05-05: Unreal Message Bus Overview
UE4 Twitch 2016 05-05: Unreal Message Bus Overview
 
GDCE 2015: Blueprint Components to C++
GDCE 2015: Blueprint Components to C++GDCE 2015: Blueprint Components to C++
GDCE 2015: Blueprint Components to C++
 
FMX 2017: Extending Unreal Engine 4 with Plug-ins (Master Class)
FMX 2017: Extending Unreal Engine 4 with Plug-ins (Master Class)FMX 2017: Extending Unreal Engine 4 with Plug-ins (Master Class)
FMX 2017: Extending Unreal Engine 4 with Plug-ins (Master Class)
 

Ähnlich wie East Coast DevCon 2014: The Slate UI Framework - Architecture & Tools

iOS Game Development With UIKit
iOS Game Development With UIKitiOS Game Development With UIKit
iOS Game Development With UIKitMartin Grider
 
【Unite 2017 Tokyo】Unity UI最適化ガイド 〜ベストプラクティスと新機能
【Unite 2017 Tokyo】Unity UI最適化ガイド 〜ベストプラクティスと新機能【Unite 2017 Tokyo】Unity UI最適化ガイド 〜ベストプラクティスと新機能
【Unite 2017 Tokyo】Unity UI最適化ガイド 〜ベストプラクティスと新機能Unity Technologies Japan K.K.
 
Windows game development with Unity 5
Windows game development with Unity 5Windows game development with Unity 5
Windows game development with Unity 5Jiri Danihelka
 
Creating great Unity games for Windows 10 - Part 1
Creating great Unity games for Windows 10 - Part 1Creating great Unity games for Windows 10 - Part 1
Creating great Unity games for Windows 10 - Part 1Jiri Danihelka
 
Develop Games With Cocos Creator - A Game Engine By Cocos
Develop Games With Cocos Creator - A Game Engine By CocosDevelop Games With Cocos Creator - A Game Engine By Cocos
Develop Games With Cocos Creator - A Game Engine By CocosLuke Stapley
 
Mixed reality for Windows 10
Mixed reality for Windows 10Mixed reality for Windows 10
Mixed reality for Windows 10Jiri Danihelka
 
Radu vunvulea building and testing windows 8 metro style applications using ...
Radu vunvulea  building and testing windows 8 metro style applications using ...Radu vunvulea  building and testing windows 8 metro style applications using ...
Radu vunvulea building and testing windows 8 metro style applications using ...Radu Vunvulea
 
The Art of Tizen UI Theme Technology in Various Profiles
The Art of Tizen UI Theme Technology in Various ProfilesThe Art of Tizen UI Theme Technology in Various Profiles
The Art of Tizen UI Theme Technology in Various ProfilesDaniel Juyung Seo
 
Qt World Summit 2015 Talk by V-Play: How to Develop with Qt for Multiple Scre...
Qt World Summit 2015 Talk by V-Play: How to Develop with Qt for Multiple Scre...Qt World Summit 2015 Talk by V-Play: How to Develop with Qt for Multiple Scre...
Qt World Summit 2015 Talk by V-Play: How to Develop with Qt for Multiple Scre...FELGO SDK
 
1-Introduction (Game Design and Development)
1-Introduction (Game Design and Development)1-Introduction (Game Design and Development)
1-Introduction (Game Design and Development)Hafiz Ammar Siddiqui
 
Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...
Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...
Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...DevClub_lv
 
Lecture 1 Introduction to VR Programming
Lecture 1 Introduction to VR ProgrammingLecture 1 Introduction to VR Programming
Lecture 1 Introduction to VR ProgrammingKobkrit Viriyayudhakorn
 
IEEE VR-SEARIS 2014 Keynote - MiddleVR - Philosophy and architecture
IEEE VR-SEARIS 2014 Keynote - MiddleVR - Philosophy and architectureIEEE VR-SEARIS 2014 Keynote - MiddleVR - Philosophy and architecture
IEEE VR-SEARIS 2014 Keynote - MiddleVR - Philosophy and architectureSebastien Kuntz
 
Game development -session on unity 3d
Game development -session on unity 3d Game development -session on unity 3d
Game development -session on unity 3d Muhammad Maaz Irfan
 
Unreal Engine Basics 05 - User Interface
Unreal Engine Basics 05 - User InterfaceUnreal Engine Basics 05 - User Interface
Unreal Engine Basics 05 - User InterfaceNick Pruehs
 
iOS and Android Development with Unity3D
iOS and Android Development with Unity3DiOS and Android Development with Unity3D
iOS and Android Development with Unity3DRalph Barbagallo
 
Sx sw speaker proposal slides
Sx sw speaker proposal slidesSx sw speaker proposal slides
Sx sw speaker proposal slidesMitch Williams
 

Ähnlich wie East Coast DevCon 2014: The Slate UI Framework - Architecture & Tools (20)

iOS Game Development With UIKit
iOS Game Development With UIKitiOS Game Development With UIKit
iOS Game Development With UIKit
 
【Unite 2017 Tokyo】Unity UI最適化ガイド 〜ベストプラクティスと新機能
【Unite 2017 Tokyo】Unity UI最適化ガイド 〜ベストプラクティスと新機能【Unite 2017 Tokyo】Unity UI最適化ガイド 〜ベストプラクティスと新機能
【Unite 2017 Tokyo】Unity UI最適化ガイド 〜ベストプラクティスと新機能
 
Unity - Game Engine
Unity - Game EngineUnity - Game Engine
Unity - Game Engine
 
Windows game development with Unity 5
Windows game development with Unity 5Windows game development with Unity 5
Windows game development with Unity 5
 
Creating great Unity games for Windows 10 - Part 1
Creating great Unity games for Windows 10 - Part 1Creating great Unity games for Windows 10 - Part 1
Creating great Unity games for Windows 10 - Part 1
 
Develop Games With Cocos Creator - A Game Engine By Cocos
Develop Games With Cocos Creator - A Game Engine By CocosDevelop Games With Cocos Creator - A Game Engine By Cocos
Develop Games With Cocos Creator - A Game Engine By Cocos
 
Mixed reality for Windows 10
Mixed reality for Windows 10Mixed reality for Windows 10
Mixed reality for Windows 10
 
Radu vunvulea building and testing windows 8 metro style applications using ...
Radu vunvulea  building and testing windows 8 metro style applications using ...Radu vunvulea  building and testing windows 8 metro style applications using ...
Radu vunvulea building and testing windows 8 metro style applications using ...
 
Maemo 6 UI Framework
Maemo 6 UI FrameworkMaemo 6 UI Framework
Maemo 6 UI Framework
 
The Art of Tizen UI Theme Technology in Various Profiles
The Art of Tizen UI Theme Technology in Various ProfilesThe Art of Tizen UI Theme Technology in Various Profiles
The Art of Tizen UI Theme Technology in Various Profiles
 
Qt World Summit 2015 Talk by V-Play: How to Develop with Qt for Multiple Scre...
Qt World Summit 2015 Talk by V-Play: How to Develop with Qt for Multiple Scre...Qt World Summit 2015 Talk by V-Play: How to Develop with Qt for Multiple Scre...
Qt World Summit 2015 Talk by V-Play: How to Develop with Qt for Multiple Scre...
 
1-Introduction (Game Design and Development)
1-Introduction (Game Design and Development)1-Introduction (Game Design and Development)
1-Introduction (Game Design and Development)
 
Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...
Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...
Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...
 
Lecture 1 Introduction to VR Programming
Lecture 1 Introduction to VR ProgrammingLecture 1 Introduction to VR Programming
Lecture 1 Introduction to VR Programming
 
IEEE VR-SEARIS 2014 Keynote - MiddleVR - Philosophy and architecture
IEEE VR-SEARIS 2014 Keynote - MiddleVR - Philosophy and architectureIEEE VR-SEARIS 2014 Keynote - MiddleVR - Philosophy and architecture
IEEE VR-SEARIS 2014 Keynote - MiddleVR - Philosophy and architecture
 
Game development -session on unity 3d
Game development -session on unity 3d Game development -session on unity 3d
Game development -session on unity 3d
 
Unreal Engine Basics 05 - User Interface
Unreal Engine Basics 05 - User InterfaceUnreal Engine Basics 05 - User Interface
Unreal Engine Basics 05 - User Interface
 
iOS and Android Development with Unity3D
iOS and Android Development with Unity3DiOS and Android Development with Unity3D
iOS and Android Development with Unity3D
 
Sx sw speaker proposal slides
Sx sw speaker proposal slidesSx sw speaker proposal slides
Sx sw speaker proposal slides
 
SWT - Technical Deep Dive
SWT - Technical Deep DiveSWT - Technical Deep Dive
SWT - Technical Deep Dive
 

Kürzlich hochgeladen

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....ShaimaaMohamedGalal
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 

Kürzlich hochgeladen (20)

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 

East Coast DevCon 2014: The Slate UI Framework - Architecture & Tools

  • 1. The Slate UI Framework Architecture & Tools Gerke Max Preussner max.preussner@epicgames.com
  • 3.
  • 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.
  • 6. 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
  • 7. // 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!")) ]; ]; }
  • 8. Slate Design & Principles Overview Features Concepts Tools Widget Gallery • Demonstrates all available Slate widgets and layouts 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
  • 10. Demo
  • 11. Demo
  • 12.
  • 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 SWidget SCompoundWidget SLeafWidget SPanel SNullWidget SBox SCanvas SBorder SImage SButton SViewport STextBlock SVirtualJoystick SGridPanel
  • 16. 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
  • 17. 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) • Lambdas are now supported, too!
  • 18. In-Game UI HUD Canvas VP Widgets Game Menus FCanvas • Low-level C++ API for drawing directly to the screen • Has been part of Unreal Engine for many years • All functions are in FCanvas class • DrawText(), DrawTexture(), DrawTile(), etc. • Use AHUD.Canvas to access the canvas object HHitProxy • Provides basic interaction support for FCanvas • Create one hit proxy per interactive object • Hit proxy ID is sent to GPU for per-pixel hit tests
  • 19. In-Game UI HUD Canvas VP Widgets Game Menus UGameViewportClient • Allows usage of Slate widgets inside game view port • Use all features of Slate (except SWindow) • Add/RemoveViewportWidgetContent() Things to keep in mind • All added widgets will be layered on top of each other (SOverlay) • Widgets should use TWeakObjPtr for UObject references
  • 20.
  • 21.
  • 22. In-Game UI HUD Canvas VP Widgets Game Menus The Hard Way • Use FCanvas to draw your own menus • Not recommended The Custom Way • Use HUD Widgets to create any menu layout The Lazy Way • Use GameMenuBuilder for paged menus • FGameMenuPage - Single menu page • FGameMenuItem - An option in a menu page • Can be customized and styled • Mostly used for settings screens
  • 23. What’s New in 4.6? Slate Improvements • Decreased impact on compilation time • Split built-in widget library into multiple modules • Named slots Unreal Motion Graphics (UMG) • Artist friendly WYSIWYG editor • 2D transformation and animation with Sequencer • Blueprint integration & scripting • Better styling system (work in progress)
  • 24. 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

Hinweis der Redaktion

  1. Prepared and presented by Gerke Max Preussner for East Coast MiniDevCon 2014, November 12-13th Email max.preussner@epicgames.com in case of comments, questions or suggestions or visit our AnswerHub at http://answers.unrealengine.com
  2. 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.
  3. 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. As you can see, there is now a common look and feel. Parts of the user interface can be separated and arranged in their own windows. We also tried to hide a lot the advanced features by default – of course, they are still available though.
  4. 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.
  5. 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.
  6. 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.
  7. 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.
  8. 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.
  9. [Widget Reflector Demo]
  10. [Widget Reflector Demo]
  11. 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).
  12. 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.
  13. 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.
  14. 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.
  15. Here you can see how the widget types relate to each other, including some of the widgets I mentioned earlier. SWidget in red, fundamental widget types in blue, and usable widgets in green. The vast majority of widgets in the Engine code base are compound widgets.
  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.
  17. While our previous presentation mainly focused on building UI for the Editor and standalone applications, this talk will be about game UI. The most common type of in-game UI is the Head-Up Display. The Engine currently provides two mechanisms to generate HUDs: Canvas and HUD Widgets.
  18. A better way for creating in-game UI is to use viewport widgets. The game’s viewport client has an API that allows for adding and removing regular Slate widgets. Since all UI is usualy displayed inside the game’s window, the use of SWindow is generally discouraged (unless you really want to open external windows from your game).
  19. Here is some sample code from our PlayerController class that adds and removes a virtual joystick widget to/from the viewport client on demand.
  20. And here is what the virtual joystick looks like in game. Notice the two circles at the bottom left and right, which can be used to control player movement on a mobile device.
  21. Another important type of game UI are in-game menus for settings or game controls. You can use either of the two techniques just mentioned, or you can leverage the new GameMenuBuilder to get up and running quickly. Most of our own in-game Uis are currently built with viewport widgets.
  22. We continue to make improvements to Slate. We are currently putting a lot of effort into improving compilation times and breaking out the many available widgets into to separate modules. Of course, we have also released Unreal Motion Graphics, which is a user interface editor built on top of Slate. UMG exposes powerful Slate features, such as 2D transformation and Blueprint scripting in designer friendly ways.
  23. 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?