Files
UnrealEngineUWP/Engine/Source/Editor/ContentBrowser/Private/ContentBrowserMenuContexts.cpp

25 lines
555 B
C++
Raw Normal View History

// Copyright Epic Games, Inc. All Rights Reserved.
#include "ContentBrowserMenuContexts.h"
#include "SContentBrowser.h"
FName UContentBrowserToolbarMenuContext::GetCurrentPath() const
{
if (TSharedPtr<SContentBrowser> Browser = ContentBrowser.Pin())
{
return *Browser->GetCurrentPath(EContentBrowserPathType::Virtual);
}
return NAME_None;
}
bool UContentBrowserToolbarMenuContext::CanWriteToCurrentPath() const
{
if (TSharedPtr<SContentBrowser> Browser = ContentBrowser.Pin())
{
return Browser->CanWriteToCurrentPath();
}
return false;
}