You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
* 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]
76 lines
2.1 KiB
C++
76 lines
2.1 KiB
C++
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "SessionFrontendPrivatePCH.h"
|
|
|
|
#include "WorkspaceMenuStructureModule.h"
|
|
#include "SDockTab.h"
|
|
|
|
|
|
static const FName SessionFrontendTabName("SessionFrontend");
|
|
|
|
|
|
/**
|
|
* Implements the SessionFrontend module.
|
|
*/
|
|
class FSessionFrontendModule
|
|
: public ISessionFrontendModule
|
|
{
|
|
public:
|
|
|
|
// ISessionFrontendModule interface
|
|
|
|
virtual TSharedRef<class SWidget> CreateSessionBrowser( const ISessionManagerRef& SessionManager ) override
|
|
{
|
|
return SNew(SSessionBrowser, SessionManager);
|
|
}
|
|
|
|
virtual TSharedRef<class SWidget> CreateSessionConsole( const ISessionManagerRef& SessionManager ) override
|
|
{
|
|
return SNew(SSessionConsole, SessionManager);
|
|
}
|
|
|
|
public:
|
|
|
|
// IModuleInterface interface
|
|
|
|
virtual void StartupModule( ) override
|
|
{
|
|
auto& TabSpawnerEntry = FGlobalTabmanager::Get()->RegisterNomadTabSpawner(SessionFrontendTabName, FOnSpawnTab::CreateRaw(this, &FSessionFrontendModule::SpawnSessionFrontendTab))
|
|
.SetDisplayName(NSLOCTEXT("FSessionFrontendModule", "FrontendTabTitle", "Session Frontend"))
|
|
.SetTooltipText(NSLOCTEXT("FSessionFrontendModule", "FrontendTooltipText", "Open the Session Frontend tab."))
|
|
.SetIcon(FSlateIcon(FEditorStyle::GetStyleSetName(), "SessionFrontEnd.TabIcon"));
|
|
|
|
#if WITH_EDITOR
|
|
TabSpawnerEntry.SetGroup(WorkspaceMenu::GetMenuStructure().GetDeveloperToolsMiscCategory());
|
|
#else
|
|
TabSpawnerEntry.SetGroup(WorkspaceMenu::GetMenuStructure().GetToolsCategory());
|
|
#endif
|
|
}
|
|
|
|
virtual void ShutdownModule( ) override
|
|
{
|
|
FGlobalTabmanager::Get()->UnregisterNomadTabSpawner(SessionFrontendTabName);
|
|
}
|
|
|
|
private:
|
|
|
|
/**
|
|
* Creates a new session front-end tab.
|
|
*
|
|
* @param SpawnTabArgs - The arguments for the tab to spawn.
|
|
* @return The spawned tab.
|
|
*/
|
|
TSharedRef<SDockTab> SpawnSessionFrontendTab( const FSpawnTabArgs& SpawnTabArgs )
|
|
{
|
|
const TSharedRef<SDockTab> DockTab = SNew(SDockTab)
|
|
.TabRole(ETabRole::MajorTab);
|
|
|
|
DockTab->SetContent(SNew(SSessionFrontend, DockTab, SpawnTabArgs.GetOwnerWindow()));
|
|
|
|
return DockTab;
|
|
}
|
|
};
|
|
|
|
|
|
IMPLEMENT_MODULE(FSessionFrontendModule, SessionFrontend);
|