Files
UnrealEngineUWP/Engine/Source/Editor/AddContentDialog/Private/AddContentDialogModule.cpp
Frank Fella fe1905e4b1 AddContentDialog - Fix issues.
+ Fix text flicker on tab switch.
+ Don't allow multiple instances of the dialog to be opened.
+ Change the tab order to match the new project dialog.
+ Fix warnings.

[CL 2386074 by Frank Fella in Main branch]
2014-12-11 16:09:40 -05:00

53 lines
1.5 KiB
C++

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#include "AddContentDialogPCH.h"
#include "AssertionMacros.h"
#include "FeaturePackContentSourceProvider.h"
#include "ModuleManager.h"
#include "SDockTab.h"
#include "WidgetCarouselModule.h"
#define LOCTEXT_NAMESPACE "AddContentDialog"
class FAddContentDialogModule : public IAddContentDialogModule
{
public:
virtual void StartupModule() override
{
FModuleManager::LoadModuleChecked<FWidgetCarouselModule>("WidgetCarousel");
ContentSourceProviderManager = TSharedPtr<FContentSourceProviderManager>(new FContentSourceProviderManager());
ContentSourceProviderManager->RegisterContentSourceProvider(MakeShareable(new FFeaturePackContentSourceProvider()));
FAddContentDialogStyle::Initialize();
}
virtual void ShutdownModule() override
{
FAddContentDialogStyle::Shutdown();
}
virtual TSharedRef<FContentSourceProviderManager> GetContentSourceProviderManager() override
{
return ContentSourceProviderManager.ToSharedRef();
}
virtual void ShowDialog(TSharedRef<SWindow> ParentWindow) override
{
if (AddContentDialog.IsValid() == false)
{
TSharedRef<SWindow> Dialog = SNew(SAddContentDialog);
FSlateApplication::Get().AddWindowAsNativeChild(Dialog, ParentWindow);
AddContentDialog = TWeakPtr<SWindow>(Dialog);
}
}
private:
TSharedPtr<FContentSourceProviderManager> ContentSourceProviderManager;
TWeakPtr<SWindow> AddContentDialog;
};
IMPLEMENT_MODULE(FAddContentDialogModule, AddContentDialog);
#undef LOCTEXT_NAMESPACE