RealtimeStyleTransferRuntime/Plugins/GameSettings/Source/Public/EditCondition/WhenCondition.h

30 lines
822 B
C
Raw Normal View History

2022-05-23 18:41:30 +00:00
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "UObject/ObjectMacros.h"
#include "GameSetting.h"
class FWhenCondition : public FGameSettingEditCondition
{
public:
FWhenCondition(TFunction<void(const ULocalPlayer* InLocalPlayer, FGameSettingEditableState&)>&& InInlineEditCondition)
: InlineEditCondition(InInlineEditCondition)
{
}
virtual void GatherEditState(const ULocalPlayer* InLocalPlayer, FGameSettingEditableState& InOutEditState) const override
{
InlineEditCondition(InLocalPlayer, InOutEditState);
}
virtual FString ToString() const override
{
return TEXT("Inline Edit Condition");
}
private:
TFunction<void(const ULocalPlayer* InLocalPlayer, FGameSettingEditableState& InOutEditState)> InlineEditCondition;
};