2016-12-08 08:52:44 -05:00
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
2014-08-28 06:22:40 -04:00
# include "STutorialButton.h"
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340)
#lockdown Nick.Penwarden
#rb none
==========================
MAJOR FEATURES + CHANGES
==========================
Change 3209340 on 2016/11/23 by Ben.Marsh
Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h.
Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms.
* Every header now includes everything it needs to compile.
* There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first.
* There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h.
* Every .cpp file includes its matching .h file first.
* This helps validate that each header is including everything it needs to compile.
* No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more.
* You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there.
* There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible.
* No engine code explicitly includes a precompiled header any more.
* We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies.
* PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files.
Tool used to generate this transform is at Engine\Source\Programs\IncludeTool.
[CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
# include "Rendering/DrawElements.h"
# include "Misc/CommandLine.h"
# include "Modules/ModuleManager.h"
# include "Layout/WidgetPath.h"
# include "Framework/Application/MenuStack.h"
# include "Framework/Application/SlateApplication.h"
# include "Textures/SlateIcon.h"
# include "Framework/Commands/UIAction.h"
# include "Widgets/Layout/SBox.h"
# include "Framework/MultiBox/MultiBoxBuilder.h"
# include "Widgets/Input/SButton.h"
# include "EditorStyleSet.h"
# include "IIntroTutorials.h"
# include "IntroTutorials.h"
2014-08-28 06:22:40 -04:00
# include "EditorTutorialSettings.h"
# include "TutorialStateSettings.h"
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340)
#lockdown Nick.Penwarden
#rb none
==========================
MAJOR FEATURES + CHANGES
==========================
Change 3209340 on 2016/11/23 by Ben.Marsh
Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h.
Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms.
* Every header now includes everything it needs to compile.
* There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first.
* There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h.
* Every .cpp file includes its matching .h file first.
* This helps validate that each header is including everything it needs to compile.
* No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more.
* You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there.
* There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible.
* No engine code explicitly includes a precompiled header any more.
* We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies.
* PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files.
Tool used to generate this transform is at Engine\Source\Programs\IncludeTool.
[CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
# include "Misc/EngineBuildSettings.h"
2015-01-24 15:00:16 -05:00
# include "AssetRegistryModule.h"
Copying //UE4/Dev-Framework to //UE4/Dev-Main (Source: //UE4/Dev-Framework @ 2994668)
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2967465 on 2016/05/05 by Marc.Audy
Fix VS2015 shadow variables fixes
Change 2970637 on 2016/05/09 by Martin.Wilson
Fix incorrect conflict resolve in merge from main
Change 2976393 on 2016/05/12 by Zak.Middleton
#ue4 - Set AudioComponent bUseAttachParentBounds=true to reduce cost of transform updates (avoids virtual CalcBounds() when transform changes).
#tests PIE w/ audio
Change 2976770 on 2016/05/13 by Lina.Halper
Improvement on mirroring fix branch
#code review: Zak.Middleton
Change 2976774 on 2016/05/13 by Lukasz.Furman
fixed missing memory callbacks for instanced behavior tree nodes
#jira UE-30305
Change 2976775 on 2016/05/13 by Lukasz.Furman
fixed multiple calls to behavior tree's instance cleanup
#jira UE-30593
Change 2976801 on 2016/05/13 by Jon.Nabozny
Add an optional argument FSkeletalMeshMerge. When set to EMeshBufferAccess::ForceCPUAndGPU, keeps a reference to the vertex buffer on CPU (e.g. for spawning particle effects).
#JIRA UE-30405
Change 2976985 on 2016/05/13 by Jon.Nabozny
Fix initializer list ordering for FSkeletalMeshMerge.
Change 2977532 on 2016/05/13 by Marc.Audy
PR #2348: [Local Multiplayer] Gamepad player assignment improvements (Contributed by kukiric)
#jira UE-30162
Change 2977637 on 2016/05/13 by Marc.Audy
Add Get/Set controller ID for a player in gameplay statics
#jira UE-28718
Change 2979387 on 2016/05/16 by Jon.Nabozny
Initialize FBox used to store results for CalculateQuatACF96Bounds.
#JIRA UE-30846
Change 2979968 on 2016/05/17 by bruce.nesbit
Added comment in FCanvasLineItem to warn only SE_BLEND_Opaque will be used when rendering.
Change 2979969 on 2016/05/17 by bruce.nesbit
Added comment in AddLine/AddPoint to warn only SE_BLEND_Opaque will be used when rendering.
Change 2980271 on 2016/05/17 by Lina.Halper
Improved comment
#code review: Benn.Gallagher
Change 2980317 on 2016/05/17 by Lukasz.Furman
removing NavCollision from static mesh on property change and PostLoad if static mesh is not supposed to have one
#ue4
Change 2980717 on 2016/05/17 by Zak.Middleton
#ue4 - Optimize UCapsuleComponent::CalcBounds() to remove sqrt and use tighter bounding sphere radius.
Change 2981193 on 2016/05/17 by Lukasz.Furman
fixed missing observers in behavior tree when dynamic subtree is changed while waiting for full restart (out of nodes)
#ue4
Change 2981927 on 2016/05/18 by Lina.Halper
- Remove vertex animation code
- Removing UVertexAnimation
- Fixed reinitialization issue that was triggered by SetVertexAnimation
- todo: consolidate UMorphtarget and UVertexAnimBase
#code review: James.Golding, Martin.Wilson
Change 2981957 on 2016/05/18 by Lina.Halper
Add recursive stack check on update animation
#code review: Martin.Wilson
Change 2982116 on 2016/05/18 by Benn.Gallagher
Removed optimize macros accidentally left after bounds extension feature for skel meshes
Change 2982255 on 2016/05/18 by Jon.Nabozny
FSkeletalMeshMerge constructor "MeshBufferAccess" default should be EMeshBufferAccess:Default instead of EMeshBufferAccess::ForceCPUAndGPU.
Change 2982607 on 2016/05/18 by Marc.Audy
Cleanup places calling GetWorld() multiple times
Change 2982621 on 2016/05/18 by Marc.Audy
Make UActorComponent::GetWorld final and inlined to avoid unnecessary function calls
Put uncached logic in to a separate function
Change 2983424 on 2016/05/19 by Marc.Audy
Minor tweaks to reduce GetWorld calls
Change 2983465 on 2016/05/19 by Lina.Halper
Combine VertexAnimBase and MorphTarget to just MorphTarget
- VertexAnimBase is gone
- Modified most of VertexAnim to MorphTarget
- Removed state, time related data
#code review: James.Golding, Rolando.Caloca
Change 2983609 on 2016/05/19 by Marc.Audy
Inline AActor::GetLevel
Half GetWorld() calls from AActor::GetNetMode()
Change 2983772 on 2016/05/19 by Marc.Audy
Fix Mac compile
Change 2983931 on 2016/05/19 by Marc.Audy
Remove pointless AccelMouse function
Change 2984061 on 2016/05/19 by Marc.Audy
Reorg some headers to fix compilation issues
Change 2984409 on 2016/05/19 by Aaron.McLeran
#jira UE-31049 Updating the Oculus Audio SDK to vs 1.02
Implementing 2984316 from Releases/4.12 to Dev-Framework
Change 2984574 on 2016/05/19 by Aaron.McLeran
Fix for platform headroom scalar. Using correct dB to linear formula (not one for power)
dB = 20 * log(Linear), not dB = 10 * log(Linear)
Change 2985041 on 2016/05/20 by Jon.Nabozny
ConvertQueryOverlap only returns the base actor if multiple actors have bSimulatePhysics enabled and are welded together.
#JIRA UE-30484
Change 2985118 on 2016/05/20 by Marc.Audy
Another attempt to convince Mac to build
Change 2985192 on 2016/05/20 by Marc.Audy
Properly forward declare ABrush
Change 2985724 on 2016/05/20 by Zak.Middleton
#ue4 - Optimize NaN and Infinite checks for FVector, FQuat, FRotator, FMatrix, FTransform. SIMD version VectorContainsNaNOrInfinite() also optimized on relevant platforms. Added startup tests for VectorContainsNaNOrInfinite().
- All our "ContainsNaN()" tests are in fact "IsNaN() || IsInfinite()", which is the same as "!IsFinite()", so exploited this to simplify the tests. Both NaN and +/-Inf are not finite (http://en.cppreference.com/w/cpp/numeric/math/isfinite). In the future we should rename ContainsNaN().
- Still need to audit some uses in shipping configs.
#jira UE-30999
Change 2986016 on 2016/05/20 by Zak.Middleton
#ue4 - Fix uint32 used for int32 values. Behavior was unaffected.
Change 2986017 on 2016/05/20 by Zak.Middleton
#ue4 - Fix overlaps being dropped from within a FScopedMoveUpdate when rotation occurs. Remove invalid assert.
Change 2986833 on 2016/05/23 by Zak.Middleton
#ue4 - Move ETeleportType from ActorComponent.h to EngineTypes.h. Add comment to FHitResult for ImpactPoint when it's penetrating.
Change 2986916 on 2016/05/23 by Rolando.Caloca
DF - GPU morph targets proof of concept
- Disabled by default
- Not compatible with gpu skin cache
- No extra memory required yet until it's used; creates buffers per frame (very slow!)
Change 2987539 on 2016/05/23 by Rolando.Caloca
DF - Remove unused member and downgrade FActiveMorphTarget to not be a USTRUCT
Change 2987981 on 2016/05/24 by James.Golding
PR #2162 : Exported AAudioVolume so that projects can derive custom classes.
https://github.com/EpicGames/UnrealEngine/pull/2162
#github 2162
#jira UE-28533
Change 2987982 on 2016/05/24 by James.Golding
PR #2318 : Fix memory allocation in CustomMeshComponent.cpp
https://github.com/EpicGames/UnrealEngine/pull/2318
#github 2318
#jira UE-29864
Change 2987983 on 2016/05/24 by James.Golding
Merging engine changes back from GDC demo:
- Export FFIRFilterTimeBased from Engine module
- Add FFIRFilterTimeBased::SetWindowDuration
- Add FBaseCompactPose::CopyBonesTo
Change 2987984 on 2016/05/24 by James.Golding
UE-30137 No longer include collision in StatiMeshComponent bounds (bounds no longer user for any collision calculation)
Change 2987985 on 2016/05/24 by James.Golding
UE-27801 Export ConvertToCollisionChannel, ConvertToObjectType, and ConvertToTraceType members of UCollisionProfile
Change 2987987 on 2016/05/24 by James.Golding
OR-17910 : Support 'show collision' in Test configuration
Change 2988123 on 2016/05/24 by Jon.Nabozny
Prevent FBodyInstance::Weld causing duplicate PhsyXShapes to be created / added to ShapeToBodiesMap when toggling SimulatePhysics on PrimitiveComponent.
#JIRA UE-31189
Change 2988449 on 2016/05/24 by Rolando.Caloca
DF - Split FActiveMorphTarget's weight into its own array in prep for GPU friendly data
Change 2988485 on 2016/05/24 by Jon.Nabozny
Swap order of setRigidBodyFlag and setRigidDynamicFlag inside UpdateInstanceSimulatePhysics to prevent PhysX error about Kinematic bodies not using CCD.
#JIRA UE-30993
Change 2988969 on 2016/05/24 by Rolando.Caloca
DF - GPU morph targets
- Enable using r.MorphTarget.Mode 1
Change 2989645 on 2016/05/25 by Marc.Audy
Apply CL# 2989481 to Dev-Framework
#jira UE-31055
Change 2989987 on 2016/05/25 by Wes.Hunt
Redo of CL#2982707 2982716 2982723 2983780 2983864 from //Orion/Dev-General in preparation for continuing Analytics refactor in a Dev branch.
AnalyticsET support for arbitrary Json events.
* AnalyticsET supports a new API, RecordEventJson.
* API supports rvalue refs to avoid unnecessary copies of the attribute array.
#AUTOMERGE using branch Orion-Dev-General-To-UE4-Dev-Framework of change#2982707 by Wes.Hunt on 2016/05/18 17:22:20.
Remove Analytics code to divert legacy code to source data collector.
#AUTOMERGE using branch Orion-Dev-General-To-UE4-Dev-Framework of change#2982716 by Wes.Hunt on 2016/05/18 17:27:25.
Analytics no longer adds IsEditor attribute to all events. Wasn't actually used by anyone anymore.
#AUTOMERGE using branch Orion-Dev-General-To-UE4-Dev-Framework of change#2982723 by Wes.Hunt on 2016/05/18 17:29:40.
Modernize FAnalyticsEventAttribute usage.
Replaced FAnalyticsEventAttribute various ctors with a perfect forwarding one that can convert them to strings.
* The Name must be convertible to a string
* The value must be convertible to a string via an AnalyticsConversion::ToString() overload.
* Added/expanded the supported conversions to strings to analytics attribute values. See AnalyticsConversion.h which contains all the previously supported conversions and more.
Added MakeAnalyticsEventAttributeArray(), which uses variadic templates to create an array of event attributes inline, which can be passed to RecordEvent[Json] and efficiently taken ownership of:
RecordEvent("EventName", MakeAnalyticsEventAttributeArray(
"Attr1", false,
"Attr2", 42.0,
"Attr3", SomeMap,
"Attr4", SomeArray);
#AUTOMERGE using branch Orion-Dev-General-To-UE4-Dev-Framework of change#2983780 by Wes.Hunt on 2016/05/19 13:51:48.
Added missing assignment copy/move ops to FAnalyticsEventAttribute. Doh, should have looked at more usages of PLATFORM_COMPILER_HAS_DEFAULTED_FUNCTIONS...
#AUTOMERGE using branch Orion-Dev-General-To-UE4-Dev-Framework of change#2983864 by Wes.Hunt on 2016/05/19 14:17:05.
Change 2989988 on 2016/05/25 by Wes.Hunt
Fix usage of FAnalyticsEventAttribute constructor using a bitfield that was invalidated by the change to make FAnalyticsEventAttribute use a perfect forwarding constructor. bitfields cannot be perfect-forwarded... :(
Change 2990493 on 2016/05/25 by Joe.Graf
Added tooltips to the collision analyzer's buttons
#CodeReview: james.golding
Change 2991064 on 2016/05/26 by James.Golding
- Remove many Animation headers from Engine.h
- Remove AnimationAsset.h from SkeletalMeshComponent.h, Character.h, CharacterMovementComponent.h
Change 2991113 on 2016/05/26 by Benn.Gallagher
Fixed edge case in random sequence player where we might trigger an extra loop when waiting on a blend to finish. And made it impossible for a shuffle list to start with the animation that is currently playing (seemingly duplicating the anim).
Change 2991163 on 2016/05/26 by Rolando.Caloca
DF - Rename and refactor some morph target compute shader in prep for interop with skin cache
Change 2991167 on 2016/05/26 by Jon.Nabozny
Add `#include "DataTable.h"` to GameplayTagsManager.h. FGameplayTagTableRow is derived from FTableRowBase which isn't necessarily included. This issue is hidden in most cases as "Engine.h" includes "DataTable.h".
Change 2991183 on 2016/05/26 by Wes.Hunt
Disable general forwarding constructor for AnalyticsEventAttribute for non arithmetic types, so they are free to choose other overloads more appropriately.
Change 2991199 on 2016/05/26 by Wes.Hunt
Drastically reducing the headers dependencies on analytics headers. Analytics headers no longer appear in PCH files, and rarely if ever appear in a header file.
IAnalyticsProviderModule.h only touches 8 source files.
Analytics.h only touches 8 source files.
IAnalyticsProvider.h only touches 5 headers and 97 source files.
AnalyticsET.h only touches 12 source files.
Change 2991301 on 2016/05/26 by James.Golding
Fix CIS for Fortnite
Change 2991319 on 2016/05/26 by James.Golding
Fix CIS for Orion
Change 2991373 on 2016/05/26 by Joe.Graf
Tweaked the tooltip text for the collision analyzer record button to be correct for both states
Added a common button style so that the buttons have a consistent look
#CodeReview: james.golding
Change 2991401 on 2016/05/26 by James.Golding
Fix UT CIS
Change 2991406 on 2016/05/26 by James.Golding
Fix Ocean CIS
Change 2991491 on 2016/05/26 by Lina.Halper
Moved MorphTarget.h
- Checked in modified functions fo AnimationRuntime for other features coming up
- Should not change any behavior of existing content
#code review: James.Golding, Rolando.Caloca
Change 2991494 on 2016/05/26 by Wes.Hunt
Fix for Unity error in AnalyticsET module after hedaer dependency reduction
Change 2991503 on 2016/05/26 by Jon.Nabozny
Fix issue where FConstraintInstance (inside UPhysicsConstraintComponent) is not editable in InstanceEditor but is editable in BlueprintEditor.
#JIRA UE-31267
Change 2991562 on 2016/05/26 by Zak.Middleton
#ue4 - Reduce allocations during movement and overlap queries and when grabbing shapes from physx actors.
Change 2991586 on 2016/05/26 by James.Golding
More CIS fixes for Orion and Fortnite
Change 2991673 on 2016/05/26 by Wes.Hunt
Another non-unity fix for Analytics include dependency reduction.
Change 2991733 on 2016/05/26 by Zak.Middleton
#dev - Test map, 50 walking dudes.
Change 2991781 on 2016/05/26 by Lina.Halper
Back out revision 15 from //UE4/Dev-Framework/Engine/Source/Runtime/Engine/Private/Animation/AnimationRuntime.cpp
- Back out a part of changes that I didn't mean to check in.
Change 2991922 on 2016/05/26 by Zak.Middleton
#ue4 - Maybe fix Mac build.
Change 2991957 on 2016/05/26 by Joe.Graf
Fixed the collision analyzer file open text (said project instead of collision)
Change 2991991 on 2016/05/26 by Lina.Halper
Fix compile error
Change 2992089 on 2016/05/26 by Zak.Middleton
#ue4 - Fix Mac/PS4 build.
Change 2992108 on 2016/05/26 by Wes.Hunt
Yet another non-unity fix for Analytics header inclusion reduction.
Change 2992190 on 2016/05/26 by Zak.Middleton
#ue4 - Mark FHitResult, FOverlapResult, FOverlapInfo as POD types. Avoids destructors etc when in TArrays.
Change 2992593 on 2016/05/27 by Martin.Wilson
Build fixes for non editor platforms
Change 2992885 on 2016/05/27 by Rolando.Caloca
DF - Fix crash on thumbnails
#jira UE-31398
Change 2993058 on 2016/05/27 by Lukasz.Furman
fixed behavior tree getting stuck on ResumeLogic call
#jira OR-22498
Change 2993064 on 2016/05/27 by Zak.Middleton
#ue4 - Fix root motion network corrections not clearing root motion data.
udn: https://udn.unrealengine.com/questions/294985/jittering-in-character-movement-during-networked-m.html
#jira UE-31316
Change 2993215 on 2016/05/27 by Lukasz.Furman
gameplay debugger fixes: navmesh rendering is not hidden after disabling tool, player stuck in spectator mode after disabling tool, confusing version description for categories without data packs
added replicated input bindings for debugger's categories
#ue4
Change 2993521 on 2016/05/27 by Zak.Middleton
#ue4 - Reduce allocations in UI Canvas items.
Change 2993995 on 2016/05/30 by Mieszko.Zielinski
Temporary fix for BBKeySelector not handling properly multiple UObject subtypes #UE4
#jira UE-31435
Change 2993998 on 2016/05/30 by Mieszko.Zielinski
Improves handling of a special case in EQS score normalization, where all items have the same score #UE4
We used to set the normalized score of 1 for all items, which was counter intuitive if all items have scored 0 in an unnormalized test. The improve handling detects that and assigns score of 0 in that case.
Change 2993999 on 2016/05/30 by Mieszko.Zielinski
Fixed FEQSParametrizedQueryExecutionRequest converting non-BB values into EQS params wrong #UE4
Change 2994000 on 2016/05/30 by Mieszko.Zielinski
Exposed UNavigationInvokerComponent as part of ENGINE_API so that it can be spawned procedurally in C++ in game specific code #UE4
Change 2994003 on 2016/05/30 by Mieszko.Zielinski
Fixed naming of console variable controllin v-logging of FGameplayAttribute #UE4
The old name was copy-pasted from somewhere.
Change 2994007 on 2016/05/30 by Mieszko.Zielinski
Fixed unregistering listeners from perception system not clearing up all data #UE4
Also, introduced two precisely named functions, GetCurrentlyPerceivedActors and GetKnownPerceivedActors to replace ambiguous GetPerceivedActors
Also, renamed UAIPerceptionComponent::TActorPerceptionContainer to UAIPerceptionComponent::FActorPerceptionContainer
Change 2994475 on 2016/05/31 by Wes.Hunt
Fix Unity build failure for analytics inclusion reduction for IOSFlurry.
[CL 2994701 by Marc Audy in Main branch]
2016-05-31 13:51:34 -04:00
# include "EngineAnalytics.h"
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340)
#lockdown Nick.Penwarden
#rb none
==========================
MAJOR FEATURES + CHANGES
==========================
Change 3209340 on 2016/11/23 by Ben.Marsh
Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h.
Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms.
* Every header now includes everything it needs to compile.
* There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first.
* There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h.
* Every .cpp file includes its matching .h file first.
* This helps validate that each header is including everything it needs to compile.
* No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more.
* You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there.
* There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible.
* No engine code explicitly includes a precompiled header any more.
* We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies.
* PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files.
Tool used to generate this transform is at Engine\Source\Programs\IncludeTool.
[CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
# include "AnalyticsEventAttribute.h"
# include "Interfaces/IAnalyticsProvider.h"
2014-08-28 06:22:40 -04:00
# define LOCTEXT_NAMESPACE "STutorialButton"
namespace TutorialButtonConstants
{
const float MaxPulseOffset = 32.0f ;
const float PulseAnimationLength = 2.0f ;
}
void STutorialButton : : Construct ( const FArguments & InArgs )
{
Context = InArgs . _Context ;
ContextWindow = InArgs . _ContextWindow ;
2014-09-22 09:42:41 -04:00
bTestAlerts = FParse : : Param ( FCommandLine : : Get ( ) , TEXT ( " TestTutorialAlerts " ) ) ;
2015-01-24 15:00:16 -05:00
bPendingClickAction = false ;
2014-08-28 06:22:40 -04:00
bTutorialAvailable = false ;
bTutorialCompleted = false ;
bTutorialDismissed = false ;
2014-09-18 08:10:29 -04:00
AlertStartTime = 0.0f ;
2014-08-28 06:22:40 -04:00
PulseAnimation . AddCurve ( 0.0f , TutorialButtonConstants : : PulseAnimationLength , ECurveEaseFunction : : Linear ) ;
2014-12-19 17:44:49 -05:00
RegisterActiveTimer ( 0.f , FWidgetActiveTimerDelegate : : CreateSP ( this , & STutorialButton : : OpenTutorialPostConstruct ) ) ;
2014-08-28 06:22:40 -04:00
2015-01-27 14:54:15 -05:00
IIntroTutorials & IntroTutorials = FModuleManager : : LoadModuleChecked < IIntroTutorials > ( TEXT ( " IntroTutorials " ) ) ;
LoadingWidget = IntroTutorials . CreateTutorialsLoadingWidget ( ContextWindow ) ;
2014-08-28 06:22:40 -04:00
ChildSlot
[
SNew ( SButton )
2014-09-12 06:18:47 -04:00
. AddMetaData < FTagMetaData > ( * FString : : Printf ( TEXT ( " %s.TutorialLaunchButton " ) , * Context . ToString ( ) ) )
2014-08-28 06:22:40 -04:00
. ButtonStyle ( FEditorStyle : : Get ( ) , " TutorialLaunch.Button " )
2014-09-10 08:09:10 -04:00
. ToolTipText ( this , & STutorialButton : : GetButtonToolTip )
2014-08-28 06:22:40 -04:00
. OnClicked ( this , & STutorialButton : : HandleButtonClicked )
. ContentPadding ( 0.0f )
[
SNew ( SBox )
. WidthOverride ( 16 )
. HeightOverride ( 16 )
]
] ;
}
2014-12-19 17:44:49 -05:00
EActiveTimerReturnType STutorialButton : : OpenTutorialPostConstruct ( double InCurrentTime , float InDeltaTime )
2014-08-28 06:22:40 -04:00
{
---- Merging with SlateDev branch ----
Introduces the concept of "Active Ticking" to allow Slate to go to sleep when there is no need to update the UI.
While asleep, Slate will skip the Tick & Paint pass for that frame entirely.
- There are TWO ways to "wake" Slate and cause a Tick/Paint pass:
1. Provide some sort of input (mouse movement, clicks, and key presses). Slate will always tick when the user is active.
- Therefore, if the logic in a given widget's Tick is only relevant in response to user action, there is no need to register an active tick.
2. Register an Active Tick. Currently this is an all-or-nothing situation, so if a single active tick needs to execute, all of Slate will be ticked.
- The purpose of an Active Tick is to allow a widget to "drive" Slate and guarantee a Tick/Paint pass in the absence of any user action.
- Examples include animation, async operations that update periodically, progress updates, loading bars, etc.
- An empty active tick is registered for viewports when they are real-time, so game project widgets are unaffected by this change and should continue to work as before.
- An Active Tick is registered by creating an FWidgetActiveTickDelegate and passing it to SWidget::RegisterActiveTick()
- There are THREE ways to unregister an active tick:
1. Return EActiveTickReturnType::StopTicking from the active tick function
2. Pass the FActiveTickHandle returned by RegisterActiveTick() to SWidget::UnregisterActiveTick()
3. Destroy the widget responsible for the active tick
- Sleeping is currently disabled, can be enabled with Slate.AllowSlateToSleep cvar
- There is currently a little buffer time during which Slate continues to tick following any input. Long-term, this is planned to be removed.
- The duration of the buffer can be adjusted using Slate.SleepBufferPostInput cvar (defaults to 1.0f)
- The FCurveSequence API has been updated to work with the active tick system
- Playing a curve sequence now requires that you pass the widget being animated by the sequence
- The active tick will automatically be registered on behalf of the widget and unregister when the sequence is complete
- GetLerpLooping() has been removed. Instead, pass true as the second param to Play() to indicate that the animation will loop. This causes the active tick to be registered indefinitely until paused or jumped to the start/end.
[CL 2391669 by Dan Hertzka in Main branch]
2014-12-17 16:07:57 -05:00
// Begin playing the pulse animation on a loop
PulseAnimation . Play ( this - > AsShared ( ) , true ) ;
RefreshStatus ( ) ;
2015-03-20 11:54:33 -04:00
if ( bTutorialAvailable & & CachedAttractTutorial ! = nullptr & & ! bTutorialDismissed & & ! bTutorialCompleted & & ! GetMutableDefault < UTutorialStateSettings > ( ) - > AreAllTutorialsDismissed ( ) )
2014-08-28 06:22:40 -04:00
{
---- Merging with SlateDev branch ----
Introduces the concept of "Active Ticking" to allow Slate to go to sleep when there is no need to update the UI.
While asleep, Slate will skip the Tick & Paint pass for that frame entirely.
- There are TWO ways to "wake" Slate and cause a Tick/Paint pass:
1. Provide some sort of input (mouse movement, clicks, and key presses). Slate will always tick when the user is active.
- Therefore, if the logic in a given widget's Tick is only relevant in response to user action, there is no need to register an active tick.
2. Register an Active Tick. Currently this is an all-or-nothing situation, so if a single active tick needs to execute, all of Slate will be ticked.
- The purpose of an Active Tick is to allow a widget to "drive" Slate and guarantee a Tick/Paint pass in the absence of any user action.
- Examples include animation, async operations that update periodically, progress updates, loading bars, etc.
- An empty active tick is registered for viewports when they are real-time, so game project widgets are unaffected by this change and should continue to work as before.
- An Active Tick is registered by creating an FWidgetActiveTickDelegate and passing it to SWidget::RegisterActiveTick()
- There are THREE ways to unregister an active tick:
1. Return EActiveTickReturnType::StopTicking from the active tick function
2. Pass the FActiveTickHandle returned by RegisterActiveTick() to SWidget::UnregisterActiveTick()
3. Destroy the widget responsible for the active tick
- Sleeping is currently disabled, can be enabled with Slate.AllowSlateToSleep cvar
- There is currently a little buffer time during which Slate continues to tick following any input. Long-term, this is planned to be removed.
- The duration of the buffer can be adjusted using Slate.SleepBufferPostInput cvar (defaults to 1.0f)
- The FCurveSequence API has been updated to work with the active tick system
- Playing a curve sequence now requires that you pass the widget being animated by the sequence
- The active tick will automatically be registered on behalf of the widget and unregister when the sequence is complete
- GetLerpLooping() has been removed. Instead, pass true as the second param to Play() to indicate that the animation will loop. This causes the active tick to be registered indefinitely until paused or jumped to the start/end.
[CL 2391669 by Dan Hertzka in Main branch]
2014-12-17 16:07:57 -05:00
// kick off the attract tutorial if the user hasn't dismissed it and hasn't completed it
FIntroTutorials & IntroTutorials = FModuleManager : : GetModuleChecked < FIntroTutorials > ( TEXT ( " IntroTutorials " ) ) ;
const bool bRestart = true ;
2015-04-02 16:56:18 -04:00
IntroTutorials . LaunchTutorial ( CachedAttractTutorial , bRestart ? IIntroTutorials : : ETutorialStartType : : TST_RESTART : IIntroTutorials : : ETutorialStartType : : TST_CONTINUE , ContextWindow ) ;
2014-08-28 06:22:40 -04:00
}
---- Merging with SlateDev branch ----
Introduces the concept of "Active Ticking" to allow Slate to go to sleep when there is no need to update the UI.
While asleep, Slate will skip the Tick & Paint pass for that frame entirely.
- There are TWO ways to "wake" Slate and cause a Tick/Paint pass:
1. Provide some sort of input (mouse movement, clicks, and key presses). Slate will always tick when the user is active.
- Therefore, if the logic in a given widget's Tick is only relevant in response to user action, there is no need to register an active tick.
2. Register an Active Tick. Currently this is an all-or-nothing situation, so if a single active tick needs to execute, all of Slate will be ticked.
- The purpose of an Active Tick is to allow a widget to "drive" Slate and guarantee a Tick/Paint pass in the absence of any user action.
- Examples include animation, async operations that update periodically, progress updates, loading bars, etc.
- An empty active tick is registered for viewports when they are real-time, so game project widgets are unaffected by this change and should continue to work as before.
- An Active Tick is registered by creating an FWidgetActiveTickDelegate and passing it to SWidget::RegisterActiveTick()
- There are THREE ways to unregister an active tick:
1. Return EActiveTickReturnType::StopTicking from the active tick function
2. Pass the FActiveTickHandle returned by RegisterActiveTick() to SWidget::UnregisterActiveTick()
3. Destroy the widget responsible for the active tick
- Sleeping is currently disabled, can be enabled with Slate.AllowSlateToSleep cvar
- There is currently a little buffer time during which Slate continues to tick following any input. Long-term, this is planned to be removed.
- The duration of the buffer can be adjusted using Slate.SleepBufferPostInput cvar (defaults to 1.0f)
- The FCurveSequence API has been updated to work with the active tick system
- Playing a curve sequence now requires that you pass the widget being animated by the sequence
- The active tick will automatically be registered on behalf of the widget and unregister when the sequence is complete
- GetLerpLooping() has been removed. Instead, pass true as the second param to Play() to indicate that the animation will loop. This causes the active tick to be registered indefinitely until paused or jumped to the start/end.
[CL 2391669 by Dan Hertzka in Main branch]
2014-12-17 16:07:57 -05:00
if ( ShouldShowAlert ( ) )
{
AlertStartTime = FPlatformTime : : Seconds ( ) ;
}
if ( CachedLaunchTutorial ! = nullptr )
{
TutorialTitle = CachedLaunchTutorial - > Title ;
}
2014-12-19 17:44:49 -05:00
return EActiveTimerReturnType : : Stop ;
2014-08-28 06:22:40 -04:00
}
static void GetAnimationValues ( float InAnimationProgress , float & OutAlphaFactor0 , float & OutPulseFactor0 , float & OutAlphaFactor1 , float & OutPulseFactor1 )
{
InAnimationProgress = FMath : : Fmod ( InAnimationProgress * 2.0f , 1.0f ) ;
OutAlphaFactor0 = FMath : : Square ( 1.0f - InAnimationProgress ) ;
OutPulseFactor0 = 1.0f - FMath : : Square ( 1.0f - InAnimationProgress ) ;
float OffsetProgress = FMath : : Fmod ( InAnimationProgress + 0.25f , 1.0f ) ;
OutAlphaFactor1 = FMath : : Square ( 1.0f - OffsetProgress ) ;
OutPulseFactor1 = 1.0f - FMath : : Square ( 1.0f - OffsetProgress ) ;
}
int32 STutorialButton : : OnPaint ( const FPaintArgs & Args , const FGeometry & AllottedGeometry , const FSlateRect & MyClippingRect , FSlateWindowElementList & OutDrawElements , int32 LayerId , const FWidgetStyle & InWidgetStyle , bool bParentEnabled ) const
{
LayerId = SCompoundWidget : : OnPaint ( Args , AllottedGeometry , MyClippingRect , OutDrawElements , LayerId , InWidgetStyle , bParentEnabled ) + 1000 ;
---- Merging with SlateDev branch ----
Introduces the concept of "Active Ticking" to allow Slate to go to sleep when there is no need to update the UI.
While asleep, Slate will skip the Tick & Paint pass for that frame entirely.
- There are TWO ways to "wake" Slate and cause a Tick/Paint pass:
1. Provide some sort of input (mouse movement, clicks, and key presses). Slate will always tick when the user is active.
- Therefore, if the logic in a given widget's Tick is only relevant in response to user action, there is no need to register an active tick.
2. Register an Active Tick. Currently this is an all-or-nothing situation, so if a single active tick needs to execute, all of Slate will be ticked.
- The purpose of an Active Tick is to allow a widget to "drive" Slate and guarantee a Tick/Paint pass in the absence of any user action.
- Examples include animation, async operations that update periodically, progress updates, loading bars, etc.
- An empty active tick is registered for viewports when they are real-time, so game project widgets are unaffected by this change and should continue to work as before.
- An Active Tick is registered by creating an FWidgetActiveTickDelegate and passing it to SWidget::RegisterActiveTick()
- There are THREE ways to unregister an active tick:
1. Return EActiveTickReturnType::StopTicking from the active tick function
2. Pass the FActiveTickHandle returned by RegisterActiveTick() to SWidget::UnregisterActiveTick()
3. Destroy the widget responsible for the active tick
- Sleeping is currently disabled, can be enabled with Slate.AllowSlateToSleep cvar
- There is currently a little buffer time during which Slate continues to tick following any input. Long-term, this is planned to be removed.
- The duration of the buffer can be adjusted using Slate.SleepBufferPostInput cvar (defaults to 1.0f)
- The FCurveSequence API has been updated to work with the active tick system
- Playing a curve sequence now requires that you pass the widget being animated by the sequence
- The active tick will automatically be registered on behalf of the widget and unregister when the sequence is complete
- GetLerpLooping() has been removed. Instead, pass true as the second param to Play() to indicate that the animation will loop. This causes the active tick to be registered indefinitely until paused or jumped to the start/end.
[CL 2391669 by Dan Hertzka in Main branch]
2014-12-17 16:07:57 -05:00
if ( PulseAnimation . IsPlaying ( ) )
2014-08-28 06:22:40 -04:00
{
float AlphaFactor0 = 0.0f ;
float AlphaFactor1 = 0.0f ;
float PulseFactor0 = 0.0f ;
float PulseFactor1 = 0.0f ;
---- Merging with SlateDev branch ----
Introduces the concept of "Active Ticking" to allow Slate to go to sleep when there is no need to update the UI.
While asleep, Slate will skip the Tick & Paint pass for that frame entirely.
- There are TWO ways to "wake" Slate and cause a Tick/Paint pass:
1. Provide some sort of input (mouse movement, clicks, and key presses). Slate will always tick when the user is active.
- Therefore, if the logic in a given widget's Tick is only relevant in response to user action, there is no need to register an active tick.
2. Register an Active Tick. Currently this is an all-or-nothing situation, so if a single active tick needs to execute, all of Slate will be ticked.
- The purpose of an Active Tick is to allow a widget to "drive" Slate and guarantee a Tick/Paint pass in the absence of any user action.
- Examples include animation, async operations that update periodically, progress updates, loading bars, etc.
- An empty active tick is registered for viewports when they are real-time, so game project widgets are unaffected by this change and should continue to work as before.
- An Active Tick is registered by creating an FWidgetActiveTickDelegate and passing it to SWidget::RegisterActiveTick()
- There are THREE ways to unregister an active tick:
1. Return EActiveTickReturnType::StopTicking from the active tick function
2. Pass the FActiveTickHandle returned by RegisterActiveTick() to SWidget::UnregisterActiveTick()
3. Destroy the widget responsible for the active tick
- Sleeping is currently disabled, can be enabled with Slate.AllowSlateToSleep cvar
- There is currently a little buffer time during which Slate continues to tick following any input. Long-term, this is planned to be removed.
- The duration of the buffer can be adjusted using Slate.SleepBufferPostInput cvar (defaults to 1.0f)
- The FCurveSequence API has been updated to work with the active tick system
- Playing a curve sequence now requires that you pass the widget being animated by the sequence
- The active tick will automatically be registered on behalf of the widget and unregister when the sequence is complete
- GetLerpLooping() has been removed. Instead, pass true as the second param to Play() to indicate that the animation will loop. This causes the active tick to be registered indefinitely until paused or jumped to the start/end.
[CL 2391669 by Dan Hertzka in Main branch]
2014-12-17 16:07:57 -05:00
GetAnimationValues ( PulseAnimation . GetLerp ( ) , AlphaFactor0 , PulseFactor0 , AlphaFactor1 , PulseFactor1 ) ;
2014-08-28 06:22:40 -04:00
const FSlateBrush * PulseBrush = FEditorStyle : : Get ( ) . GetBrush ( TEXT ( " TutorialLaunch.Circle " ) ) ;
const FLinearColor PulseColor = FEditorStyle : : Get ( ) . GetColor ( TEXT ( " TutorialLaunch.Circle.Color " ) ) ;
// We should be clipped by the window size, not our containing widget, as we want to draw outside the widget
const FVector2D WindowSize = OutDrawElements . GetWindow ( ) - > GetSizeInScreen ( ) ;
FSlateRect WindowClippingRect ( 0.0f , 0.0f , WindowSize . X , WindowSize . Y ) ;
{
FVector2D PulseOffset = FVector2D ( PulseFactor0 * TutorialButtonConstants : : MaxPulseOffset , PulseFactor0 * TutorialButtonConstants : : MaxPulseOffset ) ;
FVector2D BorderPosition = ( AllottedGeometry . AbsolutePosition - ( ( FVector2D ( PulseBrush - > Margin . Left , PulseBrush - > Margin . Top ) * PulseBrush - > ImageSize * AllottedGeometry . Scale ) + PulseOffset ) ) ;
FVector2D BorderSize = ( ( AllottedGeometry . Size * AllottedGeometry . Scale ) + ( PulseOffset * 2.0f ) + ( FVector2D ( PulseBrush - > Margin . Right * 2.0f , PulseBrush - > Margin . Bottom * 2.0f ) * PulseBrush - > ImageSize * AllottedGeometry . Scale ) ) ;
FPaintGeometry BorderGeometry ( BorderPosition , BorderSize , AllottedGeometry . Scale ) ;
// draw highlight border
FSlateDrawElement : : MakeBox ( OutDrawElements , LayerId + + , BorderGeometry , PulseBrush , WindowClippingRect , ESlateDrawEffect : : None , FLinearColor ( PulseColor . R , PulseColor . G , PulseColor . B , AlphaFactor0 ) ) ;
}
{
FVector2D PulseOffset = FVector2D ( PulseFactor1 * TutorialButtonConstants : : MaxPulseOffset , PulseFactor1 * TutorialButtonConstants : : MaxPulseOffset ) ;
FVector2D BorderPosition = ( AllottedGeometry . AbsolutePosition - ( ( FVector2D ( PulseBrush - > Margin . Left , PulseBrush - > Margin . Top ) * PulseBrush - > ImageSize * AllottedGeometry . Scale ) + PulseOffset ) ) ;
FVector2D BorderSize = ( ( AllottedGeometry . Size * AllottedGeometry . Scale ) + ( PulseOffset * 2.0f ) + ( FVector2D ( PulseBrush - > Margin . Right * 2.0f , PulseBrush - > Margin . Bottom * 2.0f ) * PulseBrush - > ImageSize * AllottedGeometry . Scale ) ) ;
FPaintGeometry BorderGeometry ( BorderPosition , BorderSize , AllottedGeometry . Scale ) ;
// draw highlight border
FSlateDrawElement : : MakeBox ( OutDrawElements , LayerId + + , BorderGeometry , PulseBrush , WindowClippingRect , ESlateDrawEffect : : None , FLinearColor ( PulseColor . R , PulseColor . G , PulseColor . B , AlphaFactor1 ) ) ;
}
}
return LayerId ;
}
FReply STutorialButton : : HandleButtonClicked ( )
{
2015-01-24 15:00:16 -05:00
if ( bPendingClickAction )
{
//There's already a click pending
return FReply : : Handled ( ) ;
}
2014-09-19 07:03:06 -04:00
RefreshStatus ( ) ;
2014-09-10 08:09:10 -04:00
2015-01-24 15:00:16 -05:00
if ( FEngineAnalytics : : IsAvailable ( ) )
2014-08-28 06:22:40 -04:00
{
2014-09-18 16:42:40 -04:00
TArray < FAnalyticsEventAttribute > EventAttributes ;
EventAttributes . Add ( FAnalyticsEventAttribute ( TEXT ( " Context " ) , Context . ToString ( ) ) ) ;
EventAttributes . Add ( FAnalyticsEventAttribute ( TEXT ( " TimeSinceAlertStarted " ) , ( AlertStartTime ! = 0.0f & & ShouldShowAlert ( ) ) ? ( FPlatformTime : : Seconds ( ) - AlertStartTime ) : - 1.0f ) ) ;
EventAttributes . Add ( FAnalyticsEventAttribute ( TEXT ( " LaunchedBrowser " ) , ShouldLaunchBrowser ( ) ) ) ;
2014-09-18 08:10:29 -04:00
2015-01-24 15:00:16 -05:00
FEngineAnalytics : : GetProvider ( ) . RecordEvent ( TEXT ( " Rocket.Tutorials.ClickedContextButton " ) , EventAttributes ) ;
2014-09-18 16:42:40 -04:00
}
2014-09-18 08:10:29 -04:00
2015-01-24 15:00:16 -05:00
bPendingClickAction = true ;
RegisterActiveTimer ( 0.f , FWidgetActiveTimerDelegate : : CreateSP ( this , & STutorialButton : : HandleButtonClicked_AssetRegistryChecker ) ) ;
2015-01-27 14:54:15 -05:00
FIntroTutorials & IntroTutorials = FModuleManager : : GetModuleChecked < FIntroTutorials > ( TEXT ( " IntroTutorials " ) ) ;
IntroTutorials . AttachWidget ( LoadingWidget ) ;
2015-01-24 15:00:16 -05:00
return FReply : : Handled ( ) ;
}
EActiveTimerReturnType STutorialButton : : HandleButtonClicked_AssetRegistryChecker ( double InCurrentTime , float InDeltaTime )
{
//Force tutorials to load into the asset registry before we proceed any further.
FAssetRegistryModule & AssetRegistry = FModuleManager : : LoadModuleChecked < FAssetRegistryModule > ( TEXT ( " AssetRegistry " ) ) ;
bool IsStillLoading = AssetRegistry . Get ( ) . IsLoadingAssets ( ) ;
if ( IsStillLoading )
{
//We could tick the asset registry here, but we don't need to.
return EActiveTimerReturnType : : Continue ;
}
//Sometimes, this gives a false positive because the tutorial we want to launch wasn't loaded into the asset registry when we checked. Opening and closing the tab works around that by letting the browser recheck.
if ( ShouldLaunchBrowser ( ) )
{
RefreshStatus ( ) ;
}
//Now we know the asset registry is loaded, the tutorial broswer is updated, and we are ready to complete the click and stop this active timer
2014-09-18 16:42:40 -04:00
FIntroTutorials & IntroTutorials = FModuleManager : : GetModuleChecked < FIntroTutorials > ( TEXT ( " IntroTutorials " ) ) ;
2015-01-27 14:54:15 -05:00
IntroTutorials . DetachWidget ( ) ;
2015-01-24 15:00:16 -05:00
if ( ShouldLaunchBrowser ( ) )
2014-09-18 16:42:40 -04:00
{
2014-10-13 06:46:06 -04:00
IntroTutorials . SummonTutorialBrowser ( ) ;
2014-09-18 16:42:40 -04:00
}
2014-09-19 07:03:06 -04:00
else if ( CachedLaunchTutorial ! = nullptr )
2014-09-18 16:42:40 -04:00
{
2015-01-24 15:00:16 -05:00
//If we don't want to launch the browser, and we have a tutorial in mind, launch the tutorial now.
2014-09-19 07:03:06 -04:00
auto Delegate = FSimpleDelegate : : CreateSP ( this , & STutorialButton : : HandleTutorialExited ) ;
2015-04-02 16:56:18 -04:00
IntroTutorials . LaunchTutorial ( CachedLaunchTutorial , IIntroTutorials : : ETutorialStartType : : TST_RESTART , ContextWindow , Delegate , Delegate ) ;
2014-09-19 07:03:06 -04:00
2015-08-12 15:25:37 -04:00
// The user asked to start the tutorial, so we don't need to remind them about it again.
// We used to remind them in future sessions, but user preference is that we don't.
const bool bDismissAcrossSessions = true ;
2014-09-19 07:03:06 -04:00
GetMutableDefault < UTutorialStateSettings > ( ) - > DismissTutorial ( CachedLaunchTutorial , bDismissAcrossSessions ) ;
GetMutableDefault < UTutorialStateSettings > ( ) - > SaveProgress ( ) ;
bTutorialDismissed = true ;
2014-08-28 06:22:40 -04:00
}
2015-01-24 15:00:16 -05:00
bPendingClickAction = false ;
return EActiveTimerReturnType : : Stop ;
2014-08-28 06:22:40 -04:00
}
FReply STutorialButton : : OnMouseButtonDown ( const FGeometry & MyGeometry , const FPointerEvent & MouseEvent )
{
2014-09-18 08:32:42 -04:00
if ( MouseEvent . GetEffectingButton ( ) = = EKeys : : RightMouseButton )
2014-08-28 06:22:40 -04:00
{
2014-09-18 08:32:42 -04:00
const bool bInShouldCloseWindowAfterMenuSelection = true ;
FMenuBuilder MenuBuilder ( bInShouldCloseWindowAfterMenuSelection , nullptr ) ;
if ( ShouldShowAlert ( ) )
2014-09-10 08:09:10 -04:00
{
MenuBuilder . AddMenuEntry (
2015-02-17 10:48:07 -05:00
LOCTEXT ( " DismissReminder " , " Don't Remind Me Again " ) ,
2015-02-18 04:12:47 -05:00
LOCTEXT ( " DismissReminderTooltip " , " Selecting this option will prevent the tutorial blip from being displayed again, even if you choose not to complete the tutorial. " ) ,
2014-09-10 08:09:10 -04:00
FSlateIcon ( ) ,
2014-09-18 08:32:42 -04:00
FUIAction ( FExecuteAction : : CreateSP ( this , & STutorialButton : : DismissAlert ) )
2014-09-10 08:09:10 -04:00
) ;
2015-02-17 10:48:07 -05:00
2015-03-20 11:54:33 -04:00
MenuBuilder . AddMenuEntry (
LOCTEXT ( " DismissAllReminders " , " Dismiss All Tutorial Reminders " ) ,
LOCTEXT ( " DismissAllRemindersTooltip " , " Selecting this option will prevent all tutorial blips from being displayed. " ) ,
FSlateIcon ( ) ,
FUIAction ( FExecuteAction : : CreateSP ( this , & STutorialButton : : DismissAllAlerts ) )
) ;
2015-02-17 10:48:07 -05:00
MenuBuilder . AddMenuSeparator ( ) ;
2014-09-10 08:09:10 -04:00
}
2014-09-18 08:32:42 -04:00
if ( bTutorialAvailable )
{
MenuBuilder . AddMenuEntry (
2015-01-26 18:35:08 -05:00
FText : : Format ( LOCTEXT ( " LaunchTutorialPattern " , " Start Tutorial: {0} " ) , TutorialTitle ) ,
FText : : Format ( LOCTEXT ( " TutorialLaunchToolTip " , " Click to begin the '{0}' tutorial " ) , TutorialTitle ) ,
2014-09-18 08:32:42 -04:00
FSlateIcon ( ) ,
FUIAction ( FExecuteAction : : CreateSP ( this , & STutorialButton : : LaunchTutorial ) )
) ;
}
MenuBuilder . AddMenuEntry (
LOCTEXT ( " LaunchBrowser " , " Show Available Tutorials " ) ,
LOCTEXT ( " LaunchBrowserTooltip " , " Display the tutorials browser " ) ,
FSlateIcon ( ) ,
FUIAction ( FExecuteAction : : CreateSP ( this , & STutorialButton : : LaunchBrowser ) )
) ;
2015-06-05 20:19:33 -04:00
FWidgetPath WidgetPath = MouseEvent . GetEventPath ( ) ! = nullptr ? * MouseEvent . GetEventPath ( ) : FWidgetPath ( ) ;
2014-09-18 08:32:42 -04:00
2015-06-05 20:19:33 -04:00
FSlateApplication : : Get ( ) . PushMenu ( SharedThis ( this ) , WidgetPath , MenuBuilder . MakeWidget ( ) , FSlateApplication : : Get ( ) . GetCursorPos ( ) , FPopupTransitionEffect : : ContextMenu ) ;
2014-08-28 06:22:40 -04:00
}
return FReply : : Handled ( ) ;
}
void STutorialButton : : DismissAlert ( )
{
2014-09-18 10:28:16 -04:00
RefreshStatus ( ) ;
2014-09-19 07:03:06 -04:00
if ( FEngineAnalytics : : IsAvailable ( ) )
{
TArray < FAnalyticsEventAttribute > EventAttributes ;
EventAttributes . Add ( FAnalyticsEventAttribute ( TEXT ( " Context " ) , Context . ToString ( ) ) ) ;
EventAttributes . Add ( FAnalyticsEventAttribute ( TEXT ( " TimeSinceAlertStarted " ) , ( AlertStartTime ! = 0.0f & & ShouldShowAlert ( ) ) ? ( FPlatformTime : : Seconds ( ) - AlertStartTime ) : - 1.0f ) ) ;
2014-09-18 08:10:29 -04:00
2014-09-19 07:03:06 -04:00
FEngineAnalytics : : GetProvider ( ) . RecordEvent ( TEXT ( " Rocket.Tutorials.DismissedTutorialAlert " ) , EventAttributes ) ;
}
2014-09-18 10:28:16 -04:00
2015-02-17 10:48:07 -05:00
// If they actually right click and choose "Dismiss Alert", we'll go ahead and suppress the tutorial reminder for this feature for good (all sessions.)
2014-09-19 07:03:06 -04:00
const bool bDismissAcrossSessions = true ;
2014-09-18 10:28:16 -04:00
if ( CachedAttractTutorial ! = nullptr )
{
GetMutableDefault < UTutorialStateSettings > ( ) - > DismissTutorial ( CachedAttractTutorial , bDismissAcrossSessions ) ;
2015-03-03 15:08:54 -05:00
CachedAttractTutorial = nullptr ;
2014-09-18 10:28:16 -04:00
}
if ( CachedLaunchTutorial ! = nullptr )
{
GetMutableDefault < UTutorialStateSettings > ( ) - > DismissTutorial ( CachedLaunchTutorial , bDismissAcrossSessions ) ;
2015-03-03 15:08:54 -05:00
CachedLaunchTutorial = nullptr ;
2014-09-18 10:28:16 -04:00
}
2014-09-19 07:03:06 -04:00
GetMutableDefault < UTutorialStateSettings > ( ) - > SaveProgress ( ) ;
bTutorialDismissed = true ;
2014-09-18 10:28:16 -04:00
2015-03-03 15:08:54 -05:00
RefreshStatus ( ) ;
2014-09-19 07:03:06 -04:00
}
2014-08-28 06:22:40 -04:00
2015-03-20 11:54:33 -04:00
void STutorialButton : : DismissAllAlerts ( )
{
GetMutableDefault < UTutorialStateSettings > ( ) - > DismissAllTutorials ( ) ;
DismissAlert ( ) ; //TODO FIXME Call this for all STutorialButtons that are currently displayed so they all stop pulsing.
}
2014-09-18 08:32:42 -04:00
void STutorialButton : : LaunchTutorial ( )
{
HandleButtonClicked ( ) ;
}
2014-09-10 08:09:10 -04:00
void STutorialButton : : LaunchBrowser ( )
{
2014-09-22 09:42:52 -04:00
RefreshStatus ( ) ;
2014-09-10 08:09:10 -04:00
2014-09-22 09:42:52 -04:00
FIntroTutorials & IntroTutorials = FModuleManager : : GetModuleChecked < FIntroTutorials > ( TEXT ( " IntroTutorials " ) ) ;
2014-10-13 06:46:06 -04:00
IntroTutorials . SummonTutorialBrowser ( ) ;
2014-09-10 08:09:10 -04:00
}
bool STutorialButton : : ShouldLaunchBrowser ( ) const
{
2015-03-18 11:36:12 -04:00
return ( ! bTutorialAvailable | | bTutorialCompleted | | bTutorialDismissed ) ;
2014-09-10 08:09:10 -04:00
}
bool STutorialButton : : ShouldShowAlert ( ) const
{
2015-03-20 11:54:33 -04:00
if ( ( bTestAlerts | | ! FEngineBuildSettings : : IsInternalBuild ( ) ) & & bTutorialAvailable & & ! ( bTutorialCompleted | | bTutorialDismissed ) )
{
2015-06-04 13:28:50 -04:00
return ( ! GetMutableDefault < UEditorTutorialSettings > ( ) - > bDisableAllTutorialAlerts & & ! GetMutableDefault < UTutorialStateSettings > ( ) - > AreAllTutorialsDismissed ( ) ) ;
2015-03-20 11:54:33 -04:00
}
return false ;
2014-09-10 08:09:10 -04:00
}
FText STutorialButton : : GetButtonToolTip ( ) const
{
if ( ShouldLaunchBrowser ( ) )
{
2015-02-17 10:48:07 -05:00
return LOCTEXT ( " TutorialLaunchBrowserToolTip " , " Show Available Tutorials... " ) ;
2014-09-10 08:09:10 -04:00
}
2014-09-18 08:32:42 -04:00
else if ( bTutorialAvailable )
{
2015-01-26 18:35:08 -05:00
return FText : : Format ( LOCTEXT ( " TutorialLaunchToolTipPattern " , " Click to begin the '{0}' tutorial, or right click for more options " ) , TutorialTitle ) ;
2014-09-18 08:32:42 -04:00
}
return LOCTEXT ( " TutorialToolTip " , " Take Tutorial " ) ;
2014-09-10 08:09:10 -04:00
}
2014-09-18 10:28:16 -04:00
void STutorialButton : : RefreshStatus ( )
{
CachedAttractTutorial = nullptr ;
CachedLaunchTutorial = nullptr ;
CachedBrowserFilter = TEXT ( " " ) ;
GetDefault < UEditorTutorialSettings > ( ) - > FindTutorialInfoForContext ( Context , CachedAttractTutorial , CachedLaunchTutorial , CachedBrowserFilter ) ;
bTutorialAvailable = ( CachedLaunchTutorial ! = nullptr ) ;
bTutorialCompleted = ( CachedLaunchTutorial ! = nullptr ) & & GetDefault < UTutorialStateSettings > ( ) - > HaveCompletedTutorial ( CachedLaunchTutorial ) ;
bTutorialDismissed = ( ( CachedAttractTutorial ! = nullptr ) & & GetDefault < UTutorialStateSettings > ( ) - > IsTutorialDismissed ( CachedAttractTutorial ) ) | |
( ( CachedLaunchTutorial ! = nullptr ) & & GetDefault < UTutorialStateSettings > ( ) - > IsTutorialDismissed ( CachedLaunchTutorial ) ) ;
---- Merging with SlateDev branch ----
Introduces the concept of "Active Ticking" to allow Slate to go to sleep when there is no need to update the UI.
While asleep, Slate will skip the Tick & Paint pass for that frame entirely.
- There are TWO ways to "wake" Slate and cause a Tick/Paint pass:
1. Provide some sort of input (mouse movement, clicks, and key presses). Slate will always tick when the user is active.
- Therefore, if the logic in a given widget's Tick is only relevant in response to user action, there is no need to register an active tick.
2. Register an Active Tick. Currently this is an all-or-nothing situation, so if a single active tick needs to execute, all of Slate will be ticked.
- The purpose of an Active Tick is to allow a widget to "drive" Slate and guarantee a Tick/Paint pass in the absence of any user action.
- Examples include animation, async operations that update periodically, progress updates, loading bars, etc.
- An empty active tick is registered for viewports when they are real-time, so game project widgets are unaffected by this change and should continue to work as before.
- An Active Tick is registered by creating an FWidgetActiveTickDelegate and passing it to SWidget::RegisterActiveTick()
- There are THREE ways to unregister an active tick:
1. Return EActiveTickReturnType::StopTicking from the active tick function
2. Pass the FActiveTickHandle returned by RegisterActiveTick() to SWidget::UnregisterActiveTick()
3. Destroy the widget responsible for the active tick
- Sleeping is currently disabled, can be enabled with Slate.AllowSlateToSleep cvar
- There is currently a little buffer time during which Slate continues to tick following any input. Long-term, this is planned to be removed.
- The duration of the buffer can be adjusted using Slate.SleepBufferPostInput cvar (defaults to 1.0f)
- The FCurveSequence API has been updated to work with the active tick system
- Playing a curve sequence now requires that you pass the widget being animated by the sequence
- The active tick will automatically be registered on behalf of the widget and unregister when the sequence is complete
- GetLerpLooping() has been removed. Instead, pass true as the second param to Play() to indicate that the animation will loop. This causes the active tick to be registered indefinitely until paused or jumped to the start/end.
[CL 2391669 by Dan Hertzka in Main branch]
2014-12-17 16:07:57 -05:00
if ( ShouldShowAlert ( ) )
{
PulseAnimation . Resume ( ) ;
}
else
{
PulseAnimation . Pause ( ) ;
}
2014-09-18 10:28:16 -04:00
}
void STutorialButton : : HandleTutorialExited ( )
{
RefreshStatus ( ) ;
}
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340)
#lockdown Nick.Penwarden
#rb none
==========================
MAJOR FEATURES + CHANGES
==========================
Change 3209340 on 2016/11/23 by Ben.Marsh
Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h.
Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms.
* Every header now includes everything it needs to compile.
* There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first.
* There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h.
* Every .cpp file includes its matching .h file first.
* This helps validate that each header is including everything it needs to compile.
* No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more.
* You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there.
* There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible.
* No engine code explicitly includes a precompiled header any more.
* We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies.
* PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files.
Tool used to generate this transform is at Engine\Source\Programs\IncludeTool.
[CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
# undef LOCTEXT_NAMESPACE