You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- Made action domain cache optional to denote if a widget tried to get an action domain but couldn't versus one that simply didn't try yet - Evaluate the current widget when calculating the action domain as it might have a meta data - Fixed crash when stopping in PIE without a full setup when action domain are enabled [REVIEW] [at]prajwal.manjunath #ROBOMERGE-AUTHOR: jc.authier #ROBOMERGE-SOURCE: CL 19100743 via CL 19103235 via CL 19106069 via CL 19106115 via CL 19110127 #ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845) [CL 19148454 by jc authier in ue5-main branch]
66 lines
1.3 KiB
C++
66 lines
1.3 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "CommonInputActionDomain.h"
|
|
|
|
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;
|
|
}
|
|
|
|
void UCommonInputActionDomainTable::PostLoad()
|
|
{
|
|
for (UCommonInputActionDomain* ActionDomain : ActionDomains)
|
|
{
|
|
if (ActionDomain && ActionDomain->bIsDefaultActionDomain)
|
|
{
|
|
DefaultActionDomainCache = ActionDomain;
|
|
break;
|
|
}
|
|
}
|
|
|
|
if (DefaultActionDomainCache.IsNull())
|
|
{
|
|
UE_LOG(LogUIActionDomain, Error, TEXT("No default action domain defined"));
|
|
}
|
|
|
|
Super::PostLoad();
|
|
} |