fix: open skill anction

This commit is contained in:
2025-10-12 15:02:39 +02:00
parent 9eb329b8d3
commit 9d3aecebf3

View File

@@ -81,7 +81,7 @@ void AUTAD_UIPlayerController::SetupInputComponent()
if (OpenSkillTreeAction)
{
EnhancedInputComponent->BindAction(
OpenSkillTreeAction, ETriggerEvent::Triggered, this,
OpenSkillTreeAction, ETriggerEvent::Started, this,
&AUTAD_UIPlayerController::OnOpenSkillTree);
}
}
@@ -210,8 +210,11 @@ void AUTAD_UIPlayerController::HideSkillTree()
{
SkillTreeWidget->RemoveFromParent();
// Set input mode back to game only
FInputModeGameOnly InputMode;
// Set input mode back to game and UI for top-down gameplay
// This allows mouse clicks to work for character movement
FInputModeGameAndUI InputMode;
InputMode.SetLockMouseToViewportBehavior(EMouseLockMode::DoNotLock);
InputMode.SetHideCursorDuringCapture(false);
SetInputMode(InputMode);
// Keep mouse cursor visible for top-down game
bShowMouseCursor = true;