2022-05-23 18:41:30 +00:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "GameSetting.h"
|
2022-09-13 07:18:28 +00:00
|
|
|
#include "Misc/AssertionMacros.h"
|
|
|
|
#include "Misc/CoreMiscDefines.h"
|
|
|
|
#include "UObject/UObjectGlobals.h"
|
2022-05-23 18:41:30 +00:00
|
|
|
|
|
|
|
#include "GameSettingValue.generated.h"
|
|
|
|
|
2022-09-13 07:18:28 +00:00
|
|
|
class UObject;
|
|
|
|
|
2022-05-23 18:41:30 +00:00
|
|
|
//--------------------------------------
|
|
|
|
// UGameSettingValue
|
|
|
|
//--------------------------------------
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The base class for all settings that are conceptually a value, that can be
|
|
|
|
* changed, and thus reset or restored to their initial value.
|
|
|
|
*/
|
|
|
|
UCLASS(Abstract)
|
|
|
|
class GAMESETTINGS_API UGameSettingValue : public UGameSetting
|
|
|
|
{
|
|
|
|
GENERATED_BODY()
|
|
|
|
|
|
|
|
public:
|
|
|
|
UGameSettingValue();
|
|
|
|
|
|
|
|
/** Stores an initial value for the setting. This will be called on initialize, but should also be called if you 'apply' the setting. */
|
|
|
|
virtual void StoreInitial() PURE_VIRTUAL(, );
|
|
|
|
|
|
|
|
/** Resets the property to the default. */
|
|
|
|
virtual void ResetToDefault() PURE_VIRTUAL(, );
|
|
|
|
|
|
|
|
/** Restores the setting to the initial value, this is the value when you open the settings before making any tweaks. */
|
|
|
|
virtual void RestoreToInitial() PURE_VIRTUAL(, );
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void OnInitialized() override;
|
|
|
|
};
|