Files
UnrealEngineUWP/Engine/Source/Editor/LevelInstanceEditor/Private/LevelInstancePivotDetails.h
patrick enfedaque 372d0e046e Level Instance Pivot Picker:
- Preview picker location when changing it from the details panel
- Use Actor Picker which isn't restricted to the Level Instance actors

#jira UE-174434
#rb richard.malo
#preflight 63cfe5fb976daa618c996b60

[CL 23831919 by patrick enfedaque in ue5-main branch]
2023-01-24 11:24:47 -05:00

41 lines
1.3 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, TWeakObjectPtr<AActor> LevelInstancePivot);
void OnPivotActorPicked(AActor* InPivotActor, TWeakObjectPtr<AActor> LevelInstancePivot);
bool IsPivotActorSelectionEnabled() const;
void ShowPivotLocation(const TWeakObjectPtr<AActor>& LevelInstancePivot);
// Settings for Apply button
ELevelInstancePivotType PivotType;
TWeakObjectPtr<AActor> PivotActor;
};