Files
UnrealEngineUWP/Engine/Source/Editor/LevelInstanceEditor/Private/LevelInstancePivotDetails.h
patrick enfedaque 804a4d7f02 LevelInstance: extract ILevelInstanceEditorPivotInterface to allow implementation in different class hierarchy
#rb  jeanfrancois.dube
#preflight 6287d9436c7692ac8ccc4c88

#ROBOMERGE-AUTHOR: patrick.enfedaque
#ROBOMERGE-SOURCE: CL 20346194 via CL 20358537 via CL 20358539 via CL 20358546
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v948-20297126)

[CL 20359851 by patrick enfedaque in ue5-main branch]
2022-05-24 23:00:53 -04:00

48 lines
1.5 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Types/SlateEnums.h"
#include "IDetailCustomization.h"
#include "LevelInstance/LevelInstanceTypes.h"
#include "Input/Reply.h"
class AActor;
class FLevelInstancePivotDetails : public IDetailCustomization
{
public:
/** Makes a new instance of this detail layout class for a specific detail view requesting it */
static TSharedRef<IDetailCustomization> MakeInstance();
/** IDetailCustomization interface */
virtual void CustomizeDetails(IDetailLayoutBuilder& DetailBuilder) override;
/** End IDetailCustomization interface */
private:
/** Use MakeInstance to create an instance of this class */
FLevelInstancePivotDetails();
bool IsApplyButtonEnabled(TWeakObjectPtr<AActor> LevelInstancePivot) const;
FReply OnApplyButtonClicked(TWeakObjectPtr<AActor> LevelInstancePivot);
int32 GetSelectedPivotType() const;
void OnSelectedPivotTypeChanged(int32 NewValue, ESelectInfo::Type SelectionType);
// struct to hold weak ptr
struct FActorInfo
{
TWeakObjectPtr<AActor> Actor;
};
TSharedRef<SWidget> OnGeneratePivotActorWidget(TSharedPtr<FActorInfo> Actor) const;
FText GetSelectedPivotActorText() const;
void OnSelectedPivotActorChanged(TSharedPtr<FActorInfo> NewValue, ESelectInfo::Type SelectionType);
bool IsPivotActorSelectionEnabled() const;
// Settings for Apply button
ELevelInstancePivotType PivotType;
TWeakObjectPtr<AActor> PivotActor;
TArray<TSharedPtr<FActorInfo>> PivotActors;
};