UE4 Slat提示框

来源:互联网 发布:seo中h1是什么意思 编辑:程序博客网 时间:2024/06/14 23:33
原文网址:http://www.v5xy.com/?p=716
#include "SNotificationList.h"#include "NotificationManager.h"auto Message = NSLOCTEXT("UnrealClient", "PAD", "PAD");FNotificationInfo Info(Message);Info.bFireAndForget = true;Info.ExpireDuration = 5.0f;Info.bUseSuccessFailIcons = false;Info.bUseLargeFont = false;FSlateNotificationManager::Get().AddNotification(Info);

截图保存提示信息的实现源码:

auto Message = NSLOCTEXT(“UnrealClient”, “HighResScreenshotSavedAs”, “High resolution screenshot saved as”);FNotificationInfo Info(Message);Info.bFireAndForget = true;Info.ExpireDuration = 5.0f;Info.bUseSuccessFailIcons = false;Info.bUseLargeFont = false;const FString HyperLinkText = FPaths::ConvertRelativePathToFull(FilePath);Info.Hyperlink = FSimpleDelegate::CreateStatic([](FString SourceFilePath){FPlatformProcess::ExploreFolder(*(FPaths::GetPath(SourceFilePath)));}, HyperLinkText);Info.HyperlinkText = FText::FromString(HyperLinkText);FSlateNotificationManager::Get().AddNotification(Info);


原创粉丝点击