Add new input device processor
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "PromptWidget.h"
|
||||
#include "InputDeviceTracker.h"
|
||||
#include "UtilityLibrary.h"
|
||||
#include "PlayerControllerBase.h"
|
||||
#include "InputAction.h"
|
||||
@@ -194,7 +195,7 @@ void UlxPromptWidget::SetKeysFromBindings(const UInputMappingContext* InputMappi
|
||||
|
||||
bool UlxPromptWidget::OnTick(float DeltaTime)
|
||||
{
|
||||
ElxControllerType Type = UlxUtilityLibrary::DetectControllerType(GetOwningLocalPlayer());
|
||||
ElxControllerType Type = UlxInputDeviceTracker::GetLastControllerType();
|
||||
if (ControllerType != Type)
|
||||
{
|
||||
ControllerType = Type;
|
||||
@@ -207,7 +208,7 @@ TSharedRef<SWidget> UlxPromptWidget::RebuildWidget()
|
||||
{
|
||||
if (!IsDesignTime())
|
||||
{
|
||||
ControllerType = UlxUtilityLibrary::DetectControllerType(GetOwningLocalPlayer());
|
||||
ControllerType = UlxInputDeviceTracker::GetLastControllerType();
|
||||
TickHandle = FTSTicker::GetCoreTicker().AddTicker(FTickerDelegate::CreateUObject(this, &UlxPromptWidget::OnTick));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user