2016-01-07 08:17:16 -05:00
|
|
|
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
#include "EnvironmentQueryEditorPrivatePCH.h"
|
2014-05-29 17:06:50 -04:00
|
|
|
#include "EnvironmentQuery/EnvQueryTest.h"
|
2014-03-14 14:13:41 -04:00
|
|
|
|
2014-10-14 10:29:11 -04:00
|
|
|
UEnvironmentQueryGraphNode_Test::UEnvironmentQueryGraphNode_Test(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer)
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
2015-02-23 10:30:16 -05:00
|
|
|
bIsSubNode = true;
|
2014-03-14 14:13:41 -04:00
|
|
|
bTestEnabled = true;
|
|
|
|
|
bHasNamedWeight = false;
|
|
|
|
|
TestWeightPct = -1.0f;
|
|
|
|
|
}
|
|
|
|
|
|
2015-02-23 10:30:16 -05:00
|
|
|
void UEnvironmentQueryGraphNode_Test::InitializeInstance()
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
2015-02-23 10:30:16 -05:00
|
|
|
UEnvQueryTest* TestInstance = Cast<UEnvQueryTest>(NodeInstance);
|
|
|
|
|
if (TestInstance)
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
2015-02-23 10:30:16 -05:00
|
|
|
TestInstance->UpdateNodeVersion();
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
2015-02-23 10:30:16 -05:00
|
|
|
UEnvironmentQueryGraphNode_Option* ParentOption = Cast<UEnvironmentQueryGraphNode_Option>(ParentNode);
|
|
|
|
|
if (ParentOption)
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
2015-02-23 10:30:16 -05:00
|
|
|
ParentOption->CalculateWeights();
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-04-23 18:30:37 -04:00
|
|
|
FText UEnvironmentQueryGraphNode_Test::GetNodeTitle(ENodeTitleType::Type TitleType) const
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
UEnvQueryTest* TestInstance = Cast<UEnvQueryTest>(NodeInstance);
|
2015-02-23 10:30:16 -05:00
|
|
|
return TestInstance ? TestInstance->GetDescriptionTitle() : FText::GetEmpty();
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
2014-04-23 18:30:37 -04:00
|
|
|
FText UEnvironmentQueryGraphNode_Test::GetDescription() const
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
UEnvQueryTest* TestInstance = Cast<UEnvQueryTest>(NodeInstance);
|
2014-04-23 18:30:37 -04:00
|
|
|
return TestInstance ? TestInstance->GetDescriptionDetails() : FText::GetEmpty();
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void UEnvironmentQueryGraphNode_Test::SetDisplayedWeight(float Pct, bool bNamed)
|
|
|
|
|
{
|
|
|
|
|
if (TestWeightPct != Pct || bHasNamedWeight != bNamed)
|
|
|
|
|
{
|
|
|
|
|
Modify();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TestWeightPct = Pct;
|
|
|
|
|
bHasNamedWeight = bNamed;
|
|
|
|
|
}
|