More progress on prompt

This commit is contained in:
2026-05-04 15:27:28 -04:00
parent 9d37f02d44
commit 3e7e6a2ae4
10 changed files with 121 additions and 73 deletions

View File

@@ -248,25 +248,6 @@ void AlxPlayerControllerBase::BuildInputStack(TArray<UInputComponent*>& InputSta
}
}
static ElxInputMode DetectInputMode(const ULocalPlayer *LocalPlayer)
{
UInputDeviceSubsystem *IDS = GEngine->GetEngineSubsystem<UInputDeviceSubsystem>();
if (!IDS) return ElxInputMode::KeyboardMouse;
FHardwareDeviceIdentifier Device = IDS->GetMostRecentlyUsedHardwareDevice(LocalPlayer->GetPlatformUserId());
if (Device.PrimaryDeviceType != EHardwareDevicePrimaryType::Gamepad)
{
return ElxInputMode::KeyboardMouse;
}
FString DeviceName = Device.HardwareDeviceIdentifier.ToString();
if (DeviceName.Contains(TEXT("PS4")) || DeviceName.Contains(TEXT("PS5")) || DeviceName.Contains(TEXT("PlayStation")))
{
return ElxInputMode::PlayStationGamepad;
}
return ElxInputMode::XboxGamepad;
}
void AlxPlayerControllerBase::UpdateInputMode()
{
// Get all the various objects we need to be able to manipulate
@@ -323,13 +304,6 @@ void AlxPlayerControllerBase::UpdateInputMode()
GameViewportClient->SetIgnoreInput(false);
ElxInputMode NewInputMode = DetectInputMode(LocalPlayer);
if (NewInputMode != CurrentInputMode)
{
CurrentInputMode = NewInputMode;
OnInputModeChanged.Broadcast(CurrentInputMode);
}
// We always put keyboard focus on whatever user widget is in
// front. If the front widget doesn't want keyboard focus,
// then we put keyboard focus on the viewport.
@@ -346,11 +320,6 @@ void AlxPlayerControllerBase::UpdateInputMode()
}
}
ElxInputMode AlxPlayerControllerBase::GetInputMode(const UObject *Context)
{
return FromContext(Context)->CurrentInputMode;
}
void AlxPlayerControllerBase::UpdateLookAt()
{
UlxTangibleManager *TM = GetGameInstance()->GetSubsystem<UlxTangibleManager>();