Files
UnrealEngineUWP/Engine/Source/Developer/CollisionAnalyzer/Private/CollisionAnalyzerModule.cpp
Wes Hunt 31e2bb00ac Removed a bunch of stuff from Slate standard include, created SlateBasics.h
* Moved Slate.h into SlateBasics.h and began shifting less commonly used headers into SlateExtras.h.
* Slate.h now simply includes SlateBasics.h and SlateExtras.h.
* Slate.h includes a deprecated warning now to indicate that SlateBasics.h + specific includes should be used instead.
* Moved dozens of inlined functions using Slate widgets into .cpp files to avoid header dependencies.
* All code samples now include SlateBasics.h and SlateExtras.h so future shifts will not break most those projects, but not trigger the deprecation warning of including Slate.h.
#BUN

[CL 2329610 by Wes Hunt in Main branch]
2014-10-14 22:50:06 -04:00

45 lines
1.4 KiB
C++

// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
#include "CollisionAnalyzerPCH.h"
#include "WorkspaceMenuStructureModule.h"
#include "SDockTab.h"
namespace CollisionAnalyzerModule
{
static const FName CollisionAnalyzerApp = FName(TEXT("CollisionAnalyzerApp"));
}
IMPLEMENT_MODULE(FCollisionAnalyzerModule, CollisionAnalyzer);
DEFINE_LOG_CATEGORY(LogCollisionAnalyzer);
void FCollisionAnalyzerModule::StartupModule()
{
CollisionAnalyzer = new FCollisionAnalyzer();
FGlobalTabmanager::Get()->RegisterNomadTabSpawner(CollisionAnalyzerModule::CollisionAnalyzerApp, FOnSpawnTab::CreateRaw(this, &FCollisionAnalyzerModule::SpawnCollisionAnalyzerTab))
.SetDisplayName(NSLOCTEXT("CollisionAnalyzerModule", "TabTitle", "Collision Analyzer"))
.SetTooltipText(NSLOCTEXT("CollisionAnalyzerModule", "TooltipText", "Open the Collision Analyzer tab."))
.SetGroup(WorkspaceMenu::GetMenuStructure().GetDeveloperToolsDebugCategory())
.SetIcon(FSlateIcon(FEditorStyle::GetStyleSetName(), "CollisionAnalyzer.TabIcon"));
}
void FCollisionAnalyzerModule::ShutdownModule()
{
if (CollisionAnalyzer != NULL)
{
delete CollisionAnalyzer;
CollisionAnalyzer = NULL;
}
}
TSharedRef<SDockTab> FCollisionAnalyzerModule::SpawnCollisionAnalyzerTab(const FSpawnTabArgs& Args)
{
check(CollisionAnalyzer);
return SNew(SDockTab)
.TabRole(ETabRole::NomadTab)
[
CollisionAnalyzer->SummonUI().ToSharedRef()
];
}