2020-09-24 00:43:27 -04:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "CoreMinimal.h"
|
|
|
|
|
#include "Factories/Factory.h"
|
2022-03-31 16:16:07 -04:00
|
|
|
#include "AssetTypeCategories.h"
|
|
|
|
|
#include "IAssetTools.h"
|
|
|
|
|
#include "IAssetTypeActions.h"
|
|
|
|
|
#include "TickableEditorObject.h"
|
|
|
|
|
#include "IDetailsView.h"
|
2020-09-24 00:43:27 -04:00
|
|
|
|
|
|
|
|
#include "InputEditorModule.generated.h"
|
|
|
|
|
|
2022-03-31 16:16:07 -04:00
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
|
|
// FInputEditorModule
|
2020-09-24 00:43:27 -04:00
|
|
|
|
2022-03-31 16:16:07 -04:00
|
|
|
class FInputEditorModule : public IModuleInterface, public FTickableEditorObject
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
// IModuleInterface interface
|
|
|
|
|
virtual void StartupModule() override;
|
|
|
|
|
virtual void ShutdownModule() override;
|
|
|
|
|
// End IModuleInterface interface
|
|
|
|
|
|
|
|
|
|
// FTickableEditorObject interface
|
|
|
|
|
virtual void Tick(float DeltaTime) override;
|
|
|
|
|
virtual TStatId GetStatId() const override { RETURN_QUICK_DECLARE_CYCLE_STAT(FInputEditorModule, STATGROUP_Tickables); }
|
|
|
|
|
// End FTickableEditorObject interface
|
|
|
|
|
|
|
|
|
|
static EAssetTypeCategories::Type GetInputAssetsCategory() { return InputAssetsCategory; }
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
void RegisterAssetTypeActions(IAssetTools& AssetTools, TSharedRef<IAssetTypeActions> Action)
|
|
|
|
|
{
|
|
|
|
|
AssetTools.RegisterAssetTypeActions(Action);
|
|
|
|
|
CreatedAssetTypeActions.Add(Action);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static EAssetTypeCategories::Type InputAssetsCategory;
|
|
|
|
|
|
|
|
|
|
TArray<TSharedPtr<IAssetTypeActions>> CreatedAssetTypeActions;
|
2022-05-20 12:13:19 -04:00
|
|
|
|
|
|
|
|
TSharedPtr<class FSlateStyleSet> StyleSet;
|
2022-03-31 16:16:07 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////
|
2020-09-24 00:43:27 -04:00
|
|
|
// Asset factories
|
|
|
|
|
|
|
|
|
|
UCLASS()
|
|
|
|
|
class INPUTEDITOR_API UInputMappingContext_Factory : public UFactory
|
|
|
|
|
{
|
|
|
|
|
GENERATED_UCLASS_BODY()
|
|
|
|
|
public:
|
|
|
|
|
virtual UObject* FactoryCreateNew(UClass* Class, UObject* InParent, FName Name, EObjectFlags Flags, UObject* Context, FFeedbackContext* Warn) override;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
UCLASS()
|
|
|
|
|
class INPUTEDITOR_API UInputAction_Factory : public UFactory
|
|
|
|
|
{
|
|
|
|
|
GENERATED_UCLASS_BODY()
|
|
|
|
|
public:
|
|
|
|
|
virtual UObject* FactoryCreateNew(UClass* Class, UObject* InParent, FName Name, EObjectFlags Flags, UObject* Context, FFeedbackContext* Warn) override;
|
|
|
|
|
};
|
|
|
|
|
|
2022-01-27 14:09:11 -05:00
|
|
|
UCLASS()
|
|
|
|
|
class INPUTEDITOR_API UPlayerMappableInputConfig_Factory : public UFactory
|
|
|
|
|
{
|
|
|
|
|
GENERATED_UCLASS_BODY()
|
|
|
|
|
public:
|
|
|
|
|
virtual UObject* FactoryCreateNew(UClass* Class, UObject* InParent, FName Name, EObjectFlags Flags, UObject* Context, FFeedbackContext* Warn) override;
|
|
|
|
|
};
|
|
|
|
|
|
2020-09-24 00:43:27 -04:00
|
|
|
// TODO: Add trigger/modifier factories and hook up RegisterAssetTypeActions type construction.
|
|
|
|
|
//
|
|
|
|
|
//UCLASS()
|
|
|
|
|
//class INPUTEDITOR_API UInputTrigger_Factory : public UBlueprintFactory
|
|
|
|
|
//{
|
|
|
|
|
// GENERATED_UCLASS_BODY()
|
|
|
|
|
//};
|
|
|
|
|
//
|
|
|
|
|
//UCLASS()
|
|
|
|
|
//class INPUTEDITOR_API UInputModifier_Factory : public UBlueprintFactory
|
|
|
|
|
//{
|
|
|
|
|
// GENERATED_UCLASS_BODY()
|
|
|
|
|
//
|
|
|
|
|
// UPROPERTY(EditAnywhere, Category = DataAsset)
|
|
|
|
|
// TSubclassOf<UDataAsset> DataAssetClass;
|
|
|
|
|
//};
|