2014-12-07 19:09:38 -05:00
|
|
|
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "SoundCueEditorModule.h"
|
|
|
|
|
#include "ModuleManager.h"
|
|
|
|
|
#include "SoundCueEditor.h"
|
|
|
|
|
|
|
|
|
|
DEFINE_LOG_CATEGORY(LogSoundCueEditor);
|
|
|
|
|
|
|
|
|
|
const FName SoundCueEditorAppIdentifier = FName(TEXT("SoundCueEditorApp"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*-----------------------------------------------------------------------------
|
|
|
|
|
FSoundCueEditorModule
|
|
|
|
|
-----------------------------------------------------------------------------*/
|
|
|
|
|
#include "SoundDefinitions.h"
|
2014-11-12 04:43:54 -05:00
|
|
|
#include "Sound/SoundCue.h"
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
class FSoundCueEditorModule : public ISoundCueEditorModule
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
/** Constructor, set up console commands and variables **/
|
|
|
|
|
FSoundCueEditorModule()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** Called right after the module DLL has been loaded and the module object has been created */
|
2014-06-13 06:14:46 -04:00
|
|
|
virtual void StartupModule() override
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
MenuExtensibilityManager = MakeShareable(new FExtensibilityManager);
|
|
|
|
|
ToolBarExtensibilityManager = MakeShareable(new FExtensibilityManager);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** Called before the module is unloaded, right before the module object is destroyed. */
|
2014-06-13 06:14:46 -04:00
|
|
|
virtual void ShutdownModule() override
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
MenuExtensibilityManager.Reset();
|
|
|
|
|
ToolBarExtensibilityManager.Reset();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** Creates a new material editor, either for a material or a material function */
|
2014-06-13 06:14:46 -04:00
|
|
|
virtual TSharedRef<ISoundCueEditor> CreateSoundCueEditor(const EToolkitMode::Type Mode, const TSharedPtr< IToolkitHost >& InitToolkitHost, USoundCue* SoundCue) override
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
TSharedRef<FSoundCueEditor> NewSoundCueEditor(new FSoundCueEditor());
|
|
|
|
|
NewSoundCueEditor->InitSoundCueEditor(Mode, InitToolkitHost, SoundCue);
|
|
|
|
|
return NewSoundCueEditor;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** Gets the extensibility managers for outside entities to extend static mesh editor's menus and toolbars */
|
2015-04-01 07:20:55 -04:00
|
|
|
virtual TSharedPtr<FExtensibilityManager> GetMenuExtensibilityManager() override { return MenuExtensibilityManager; }
|
|
|
|
|
virtual TSharedPtr<FExtensibilityManager> GetToolBarExtensibilityManager() override { return ToolBarExtensibilityManager; }
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
TSharedPtr<FExtensibilityManager> MenuExtensibilityManager;
|
|
|
|
|
TSharedPtr<FExtensibilityManager> ToolBarExtensibilityManager;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
IMPLEMENT_MODULE(FSoundCueEditorModule, SoundCueEditor);
|