added main and pause menus

This commit is contained in:
2026-06-05 20:00:33 +03:00
parent 0792f7cdfd
commit 61d5a57d8d
53 changed files with 1402 additions and 49 deletions
@@ -89,6 +89,7 @@ void ANakedDesireCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInp
EnhancedInputComponent->BindAction(EquipmentAction, ETriggerEvent::Started, this, &ANakedDesireCharacter::OnEquipmentPress);
EnhancedInputComponent->BindAction(InteractAction, ETriggerEvent::Started, this, &ANakedDesireCharacter::OnInteractPress);
EnhancedInputComponent->BindAction(PhoneAction, ETriggerEvent::Started, this, &ANakedDesireCharacter::OnPhonePress);
EnhancedInputComponent->BindAction(PauseAction, ETriggerEvent::Started, this, &ANakedDesireCharacter::OnPausePress);
}
}
@@ -270,6 +271,11 @@ void ANakedDesireCharacter::OnPhonePress(const FInputActionValue& Value)
HUD->GetGameLayoutWidget()->OpenPhone();
}
void ANakedDesireCharacter::OnPausePress(const FInputActionValue& Value)
{
HUD->GetGameLayoutWidget()->OpenPauseMenu();
}
void ANakedDesireCharacter::NotifyNoticed(ANPCAIController* NPCController)
{
OnNoticed.Broadcast(NPCController);
@@ -61,6 +61,9 @@ public:
UPROPERTY(EditDefaultsOnly, Category = "Input")
UInputAction* PhoneAction;
UPROPERTY(EditDefaultsOnly, Category = "Input")
UInputAction* PauseAction;
// Clothing slot meshes are spawned per equipped slot at runtime by ClothingVisualsComponent.
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Clothing")
UClothingVisualsComponent* ClothingVisualsComponent;
@@ -145,6 +148,7 @@ private:
void OnEquipmentPress(const FInputActionValue& Value);
void OnInteractPress(const FInputActionValue& Value);
void OnPhonePress(const FInputActionValue& Value);
void OnPausePress(const FInputActionValue& Value);
bool CheckSight(const FVector& StartLocation, const FVector& EndLocation, FHitResult& HitResult, const AActor* IgnoreActor);