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

37 lines
1.4 KiB
C
Raw Normal View History

2022-05-23 18:41:30 +00:00
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
2022-09-13 07:18:28 +00:00
#include "Containers/UnrealString.h"
2022-05-23 18:41:30 +00:00
#include "GameSettingFilterState.h"
2022-09-13 07:18:28 +00:00
#include "GameplayTagContainer.h"
#include "Internationalization/Text.h"
#include "Templates/SharedPointer.h"
2022-05-23 18:41:30 +00:00
class ULocalPlayer;
//////////////////////////////////////////////////////////////////////
// FWhenPlatformHasTrait
// Edit condition for game settings that checks CommonUI's platform traits
// to determine whether or not to show a setting
class GAMESETTINGS_API FWhenPlatformHasTrait : public FGameSettingEditCondition
{
public:
static TSharedRef<FWhenPlatformHasTrait> KillIfMissing(FGameplayTag InVisibilityTag, const FString& InKillReason);
static TSharedRef<FWhenPlatformHasTrait> DisableIfMissing(FGameplayTag InVisibilityTag, const FText& InDisableReason);
static TSharedRef<FWhenPlatformHasTrait> KillIfPresent(FGameplayTag InVisibilityTag, const FString& InKillReason);
static TSharedRef<FWhenPlatformHasTrait> DisableIfPresent(FGameplayTag InVisibilityTag, const FText& InDisableReason);
//~FGameSettingEditCondition interface
virtual void GatherEditState(const ULocalPlayer* InLocalPlayer, FGameSettingEditableState& InOutEditState) const override;
//~End of FGameSettingEditCondition interface
private:
FGameplayTag VisibilityTag;
bool bTagDesired;
FString KillReason;
FText DisableReason;
};