You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
This represents UE4/Main @18073326, Release-5.0 @18081140 and Dev-PerfTest @18045971 [CL 18081471 by aurel cordonnier in ue5-release-engine-test branch]
40 lines
1.5 KiB
C++
40 lines
1.5 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "AssetNotifications.h"
|
|
#include "Animation/Skeleton.h"
|
|
#include "Framework/Notifications/NotificationManager.h"
|
|
#include "Widgets/Notifications/SNotificationList.h"
|
|
|
|
#define LOCTEXT_NAMESPACE "AssetNotifications"
|
|
|
|
void FAssetNotifications::SkeletonNeedsToBeSaved(const USkeleton* Skeleton)
|
|
{
|
|
FFormatNamedArguments Args;
|
|
Args.Add( TEXT("SkeletonName"), FText::FromString( Skeleton->GetName() ) );
|
|
FNotificationInfo Info( FText::Format( LOCTEXT("SkeletonNeedsToBeSaved", "Skeleton {SkeletonName} needs to be saved"), Args ) );
|
|
Info.ExpireDuration = 5.0f;
|
|
Info.bUseLargeFont = false;
|
|
TSharedPtr<SNotificationItem> Notification = FSlateNotificationManager::Get().AddNotification(Info);
|
|
if ( Notification.IsValid() )
|
|
{
|
|
Notification->SetCompletionState( SNotificationItem::CS_None );
|
|
}
|
|
}
|
|
|
|
void FAssetNotifications::CannotEditCookedAsset(const class UObject* Asset)
|
|
{
|
|
FFormatNamedArguments Args;
|
|
Args.Add(TEXT("AssetName"), Asset ? FText::FromString(Asset->GetName()) : FText::GetEmpty());
|
|
FNotificationInfo Info(FText::Format(LOCTEXT("CannotEditCookedAsset", "Cannot edit cooked asset {AssetName}"), Args));
|
|
Info.ExpireDuration = 5.0f;
|
|
Info.bUseLargeFont = false;
|
|
Info.bUseSuccessFailIcons = true;
|
|
TSharedPtr<SNotificationItem> Notification = FSlateNotificationManager::Get().AddNotification(Info);
|
|
if (Notification.IsValid())
|
|
{
|
|
Notification->SetCompletionState(SNotificationItem::CS_Fail);
|
|
}
|
|
}
|
|
|
|
#undef LOCTEXT_NAMESPACE
|