You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
NOTE: Old tutorials not deprecated (yet), but widget highlights in old tutorials will stop working with this change! Added new Blueprintable UEditorTutorial object. Added suite of widgets and details customizations to display tutorials. New system is available on command line switch -NewTutorials. Slate changes: Tag names are now stored in SWidgets, rather than simply being discarded. Removed STutorialWrapper in favour of using Tags. Added Tags to more multibox widgets, so virtually all can now be picked. Added SWindow::HasOverlay so we dont attempt to add overlays to widows that cannot have them. [CL 2244216 by Thomas Sarkanen in Main branch]
73 lines
2.3 KiB
C++
73 lines
2.3 KiB
C++
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
class UEditorTutorial;
|
|
class SEditorTutorials;
|
|
|
|
/**
|
|
* The widget which simply monitors windows in its tick function to see if we need to attach
|
|
* a tutorial overlay.
|
|
*/
|
|
class STutorialRoot : public SCompoundWidget, public FGCObject
|
|
{
|
|
public:
|
|
SLATE_BEGIN_ARGS( STutorialRoot )
|
|
{
|
|
_Visibility = EVisibility::HitTestInvisible;
|
|
}
|
|
|
|
SLATE_END_ARGS()
|
|
|
|
void Construct(const FArguments& InArgs);
|
|
|
|
/** SWidget implementation */
|
|
virtual void Tick( const FGeometry& AllottedGeometry, const double InCurrentTime, const float InDeltaTime ) override;
|
|
|
|
/** FGCObject implementation */
|
|
virtual void AddReferencedObjects( FReferenceCollector& Collector ) override;
|
|
|
|
/** Launch the specified tutorial from the specified window */
|
|
void LaunchTutorial(UEditorTutorial* InTutorial, bool bInRestart, TWeakPtr<SWindow> InNavigationWindow);
|
|
|
|
/** Summon the browser widget for the specified window */
|
|
void SummonTutorialBrowser(TSharedRef<SWindow> InWindow, const FString& InFilter = TEXT(""));
|
|
|
|
/** Reload tutorials that we know about */
|
|
void ReloadTutorials();
|
|
|
|
private:
|
|
/** Handle when the next button is clicked - forward navigation to other overlays */
|
|
void HandleNextClicked(TWeakPtr<SWindow> InNavigationWindow);
|
|
|
|
/** Handle when the back button is clicked - forward navigation to other overlays */
|
|
void HandleBackClicked();
|
|
|
|
/** Handle when the home button is clicked - forward navigation to other overlays */
|
|
void HandleHomeClicked();
|
|
|
|
/** Handle retrieving the current tutorial */
|
|
UEditorTutorial* HandleGetCurrentTutorial();
|
|
|
|
/** Handle retrieving the current tutorial stage */
|
|
int32 HandleGetCurrentTutorialStage();
|
|
|
|
/** Got to the previous stage in the current tutorial */
|
|
void GoToPreviousStage();
|
|
|
|
/** Got to the next stage in the current tutorial */
|
|
void GoToNextStage(TWeakPtr<SWindow> InNavigationWindow);
|
|
|
|
/** Function called on Tick() to check active windows for whether they need an overlay adding */
|
|
void MaybeAddOverlay(TSharedRef<SWindow> InWindow);
|
|
|
|
private:
|
|
/** Container widgets, inserted into window overlays */
|
|
TMap<TWeakPtr<SWindow>, TWeakPtr<SEditorTutorials>> TutorialWidgets;
|
|
|
|
/** Tutorial we are currently viewing */
|
|
UEditorTutorial* CurrentTutorial;
|
|
|
|
/** Current stage of tutorial */
|
|
int32 CurrentTutorialStage;
|
|
}; |