34 lines
1.0 KiB
C
34 lines
1.0 KiB
C
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
||
|
|
||
|
#pragma once
|
||
|
|
||
|
#include "CoreMinimal.h"
|
||
|
#include "UObject/ObjectMacros.h"
|
||
|
#include "Delegates/Delegate.h"
|
||
|
|
||
|
class ULocalPlayer;
|
||
|
|
||
|
//--------------------------------------
|
||
|
// FGameSettingDataSource
|
||
|
//--------------------------------------
|
||
|
|
||
|
class GAMESETTINGS_API FGameSettingDataSource : public TSharedFromThis<FGameSettingDataSource>
|
||
|
{
|
||
|
public:
|
||
|
virtual ~FGameSettingDataSource() { }
|
||
|
|
||
|
/**
|
||
|
* Some settings may take an async amount of time to finish initializing. The settings system will wait
|
||
|
* for all settings to be ready before showing the setting.
|
||
|
*/
|
||
|
virtual void Startup(ULocalPlayer* InLocalPlayer, FSimpleDelegate StartupCompleteCallback) { StartupCompleteCallback.ExecuteIfBound(); }
|
||
|
|
||
|
virtual bool Resolve(ULocalPlayer* InContext) = 0;
|
||
|
|
||
|
virtual FString GetValueAsString(ULocalPlayer* InContext) const = 0;
|
||
|
|
||
|
virtual void SetValue(ULocalPlayer* InContext, const FString& Value) = 0;
|
||
|
|
||
|
virtual FString ToString() const = 0;
|
||
|
};
|