You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
The Favorites category is now always visible, and displays a note about how to add properties there when empty. #rb chris.gagnon #jira UETOOL-2769 [CL 15208242 by sebastian nordgren in ue5-main branch]
45 lines
1003 B
C++
45 lines
1003 B
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "EditorConfig.h"
|
|
#include "EditorSubsystem.h"
|
|
|
|
#include "EditorConfigSubsystem.generated.h"
|
|
|
|
DECLARE_DELEGATE_OneParam(FOnCompletedDelegate, bool);
|
|
|
|
UCLASS()
|
|
class EDITORCONFIG_API UEditorConfigSubsystem :
|
|
public UEditorSubsystem
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
UEditorConfigSubsystem();
|
|
|
|
void Initialize(FSubsystemCollectionBase& Collection);
|
|
|
|
TSharedPtr<FEditorConfig> FindOrLoadConfig(FStringView ConfigName);
|
|
void SaveConfig(TSharedPtr<FEditorConfig> Config, FOnCompletedDelegate OnCompleted);
|
|
|
|
void AddSearchDirectory(FStringView SearchDir);
|
|
|
|
private:
|
|
void OnSaveCompleted(TSharedPtr<FEditorConfig> Config);
|
|
|
|
private:
|
|
struct FPendingSave
|
|
{
|
|
FString FileName;
|
|
TSharedPtr<FEditorConfig> Config;
|
|
TFuture<bool> WasSuccess;
|
|
FOnCompletedDelegate OnCompleted;
|
|
};
|
|
|
|
FRWLock SaveLock;
|
|
TArray<FPendingSave> PendingSaves;
|
|
TArray<FString> SearchDirectories;
|
|
TMap<FString, TSharedPtr<FEditorConfig>> LoadedConfigs;
|
|
};
|