Files
UnrealEngineUWP/Engine/Plugins/Experimental/CommonUI/Source/CommonInput/Private/CommonInputActionDomain.cpp
jc authier cc8184ae0c Common Input:
- Change GetCalculatedActionDomain to first check for a meta data on the widget to get the action domain. Else check if the CAW is overriding the action domain
- Add ICommonInputActionDomainMetaData to define the action domain used by a SWidget
- Add description to CVarEnableActionDomainRouting

[REVIEW] [at]prajwal.manjunath

#ROBOMERGE-AUTHOR: jc.authier
#ROBOMERGE-SOURCE: CL 19076506 via CL 19079995 via CL 19088418 via CL 19088500 via CL 19089497
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19131708 by jc authier in ue5-main branch]
2022-02-24 19:08:09 -05:00

59 lines
1.1 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "CommonInputActionDomain.h"
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;
}
void UCommonInputActionDomainTable::PostLoad()
{
for (UCommonInputActionDomain* ActionDomain : ActionDomains)
{
if (ActionDomain && ActionDomain->bIsDefaultActionDomain)
{
DefaultActionDomainCache = ActionDomain;
break;
}
}
Super::PostLoad();
}