Files
UnrealEngineUWP/Engine/Source/Editor/ActorPickerMode/Public/ActorPickerMode.h
Marc Audy 68150e0be7 Merge UE5/Release-Engine-Staging to UE5/Main @ 14611496
This represents UE4/Main @ 14594913

[CL 14612291 by Marc Audy in ue5-main branch]
2020-10-29 13:38:15 -04:00

47 lines
1.6 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Modules/ModuleInterface.h"
class AActor;
DECLARE_DELEGATE_OneParam( FOnGetAllowedClasses, TArray<const UClass*>& );
DECLARE_DELEGATE_OneParam( FOnActorSelected, AActor* );
DECLARE_DELEGATE_RetVal_OneParam(bool, FOnShouldFilterActor, const AActor*);
/**
* Actor picker mode module
*/
class ACTORPICKERMODE_API FActorPickerModeModule : public IModuleInterface
{
public:
// IModuleInterface
virtual void StartupModule() override;
virtual void ShutdownModule() override;
// End of IModuleInterface
/**
* Enter actor picking mode (note: will cancel any current actor picking)
* @param InOnGetAllowedClasses Delegate used to only allow actors using a particular set of classes (empty to accept all actor classes; works alongside InOnShouldFilterActor)
* @param InOnShouldFilterActor Delegate used to only allow particular actors (empty to accept all actors; works alongside InOnGetAllowedClasses)
* @param InOnActorSelected Delegate to call when a valid actor is selected
*/
void BeginActorPickingMode(FOnGetAllowedClasses InOnGetAllowedClasses, FOnShouldFilterActor InOnShouldFilterActor, FOnActorSelected InOnActorSelected) const;
/** Exit actor picking mode */
void EndActorPickingMode() const;
/** @return Whether or not actor picking mode is currently active */
bool IsInActorPickingMode() const;
private:
/** Handler for when the application is deactivated. */
void OnApplicationDeactivated(const bool IsActive) const;
private:
FDelegateHandle OnApplicationDeactivatedHandle;
};