You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rnx #rb none #ROBOMERGE-SOURCE: CL 10869241 via CL 10869527 via CL 10869904 #ROBOMERGE-BOT: (v613-10869866) [CL 10870586 by ryan durand in Main branch]
53 lines
1.9 KiB
C++
53 lines
1.9 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Input/Reply.h"
|
|
#include "IPropertyTypeCustomization.h"
|
|
#include "PropertyHandle.h"
|
|
|
|
class SButton;
|
|
class SComboButton;
|
|
class IMenu;
|
|
|
|
class FDirectoryPathStructCustomization : public IPropertyTypeCustomization
|
|
{
|
|
public:
|
|
static TSharedRef<IPropertyTypeCustomization> MakeInstance();
|
|
|
|
/** IPropertyTypeCustomization interface */
|
|
virtual void CustomizeHeader( TSharedRef<class IPropertyHandle> StructPropertyHandle, class FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& StructCustomizationUtils ) override;
|
|
|
|
virtual void CustomizeChildren( TSharedRef<class IPropertyHandle> StructPropertyHandle, class IDetailChildrenBuilder& StructBuilder, IPropertyTypeCustomizationUtils& StructCustomizationUtils ) override;
|
|
|
|
private:
|
|
|
|
/** Delegate for displaying text value of path */
|
|
FText GetDisplayedText(TSharedRef<IPropertyHandle> PropertyHandle) const;
|
|
|
|
/** Delegate used to display a directory picker */
|
|
FReply OnPickContent(TSharedRef<IPropertyHandle> PropertyHandle) ;
|
|
|
|
/** Delegate used to display a directory picker */
|
|
FReply OnPickDirectory(TSharedRef<IPropertyHandle> PropertyHandle, const bool bRelativeToGameContentDir, const bool bUseRelativePaths) const;
|
|
|
|
/** Check whether that the chosen path is valid */
|
|
bool IsValidPath(const FString& AbsolutePath, const bool bRelativeToGameContentDir, FText* const OutReason = nullptr) const;
|
|
|
|
/** Called when a path is picked from the path picker */
|
|
void OnPathPicked(const FString& Path, TSharedRef<IPropertyHandle> PropertyHandle);
|
|
|
|
/** The browse button widget */
|
|
TSharedPtr<SButton> BrowseButton;
|
|
|
|
/** The pick button widget */
|
|
TSharedPtr<SButton> PickerButton;
|
|
|
|
/** The pick button popup menu*/
|
|
TSharedPtr<IMenu> PickerMenu;
|
|
|
|
/** Absolute path to the game content directory */
|
|
FString AbsoluteGameContentDir;
|
|
};
|