Files
UnrealEngineUWP/Engine/Plugins/Runtime/CommonUI/Source/CommonInput/Private/CommonInputActionDomain.cpp
daren cheng 3fd00dab55 Move CommonUI out of Experimental and into Beta
#jira UE-163710
#rb trivial
#preflight 645015d1de57652122c040be

[CL 25309525 by daren cheng in ue5-main branch]
2023-05-02 18:18:44 -04:00

51 lines
1021 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "CommonInputActionDomain.h"
#include UE_INLINE_GENERATED_CPP_BY_NAME(CommonInputActionDomain)
DEFINE_LOG_CATEGORY(LogUIActionDomain);
bool UCommonInputActionDomain::ShouldBreakInnerEventFlow(bool bInputEventHandled) const
{
switch (InnerBehavior)
{
case ECommonInputEventFlowBehavior::BlockIfActive:
{
return true;
}
case ECommonInputEventFlowBehavior::BlockIfHandled:
{
return bInputEventHandled;
}
case ECommonInputEventFlowBehavior::NeverBlock:
{
return false;
}
}
return false;
}
bool UCommonInputActionDomain::ShouldBreakEventFlow(bool bDomainHadActiveRoots, bool bInputEventHandledAtLeastOnce) const
{
switch (Behavior)
{
case ECommonInputEventFlowBehavior::BlockIfActive:
{
return bDomainHadActiveRoots;
}
case ECommonInputEventFlowBehavior::BlockIfHandled:
{
return bInputEventHandledAtLeastOnce;
}
case ECommonInputEventFlowBehavior::NeverBlock:
{
return false;
}
}
return false;
}