Files
UnrealEngineUWP/Engine/Source/Editor/Persona/Private/PersonaEditorModeManager.cpp
Chris Gagnon 930e33cb48 Copying //UE4/Dev-Editor to Dev-Main (//UE4/Dev-Main) for 4.23 From CL 6837861
#rb none

[CL 6838042 by Chris Gagnon in Main branch]
2019-06-04 15:42:48 -04:00

33 lines
950 B
C++

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#include "PersonaEditorModeManager.h"
#include "IPersonaEditMode.h"
bool FPersonaEditorModeManager::GetCameraTarget(FSphere& OutTarget) const
{
// Note: assumes all of our modes are IPersonaEditMode!
for(int32 ModeIndex = 0; ModeIndex < ActiveModes.Num(); ++ModeIndex)
{
TSharedPtr<IPersonaEditMode> EditMode = StaticCastSharedPtr<IPersonaEditMode>(ActiveModes[ModeIndex]);
FSphere Target;
if (EditMode->GetCameraTarget(Target))
{
OutTarget = Target;
return true;
}
}
return false;
}
void FPersonaEditorModeManager::GetOnScreenDebugInfo(TArray<FText>& OutDebugText) const
{
// Note: assumes all of our modes are IPersonaEditMode!
for (int32 ModeIndex = 0; ModeIndex < ActiveModes.Num(); ++ModeIndex)
{
TSharedPtr<IPersonaEditMode> EditMode = StaticCastSharedPtr<IPersonaEditMode>(ActiveModes[ModeIndex]);
EditMode->GetOnScreenDebugInfo(OutDebugText);
}
}