Updated TurnBaseCombat to Show Cursor

This commit is contained in:
Philip W 2022-11-14 03:18:50 +00:00
parent ce4c2294c4
commit 7fb9935e70

View File

@ -28,6 +28,15 @@ void ATurnBaseCombat::BeginPlay()
UUserWidget* HUD = CreateWidget<UUserWidget>(GetWorld(), HUDWidget);
HUD->AddToViewport();
APlayerController* PC = Cast<APlayerController>(GetWorld()->GetFirstPlayerController());
if (PC)
{
PC->bShowMouseCursor = true;
PC->bEnableClickEvents = true;
PC->bEnableMouseOverEvents = true;
}
TurnIndicatorTextBlock = Cast<UTextBlock>(HUD->GetWidgetFromName("TurnIndicator"));
CurrentComboTextBlock = Cast<UTextBlock>(HUD->GetWidgetFromName("CurrentCombo"));
ActionPointsTextBlock = Cast<UTextBlock>(HUD->GetWidgetFromName("ActionPoints"));