Setup phone UI

This commit is contained in:
2026-06-02 00:06:13 +03:00
parent c529544bc7
commit ff62b06802
20 changed files with 350 additions and 5 deletions
@@ -88,6 +88,7 @@ void ANakedDesireCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInp
EnhancedInputComponent->BindAction(CrouchAction, ETriggerEvent::Completed, this, &ANakedDesireCharacter::OnCrouchToggle);
EnhancedInputComponent->BindAction(EquipmentAction, ETriggerEvent::Started, this, &ANakedDesireCharacter::OnEquipmentPress);
EnhancedInputComponent->BindAction(InteractAction, ETriggerEvent::Started, this, &ANakedDesireCharacter::OnInteractPress);
EnhancedInputComponent->BindAction(PhoneAction, ETriggerEvent::Started, this, &ANakedDesireCharacter::OnPhonePress);
}
}
@@ -264,6 +265,11 @@ void ANakedDesireCharacter::OnInteractPress(const FInputActionValue& Value)
InteractionComponent->Interact();
}
void ANakedDesireCharacter::OnPhonePress(const FInputActionValue& Value)
{
HUD->GetGameLayoutWidget()->OpenPhone();
}
void ANakedDesireCharacter::NotifyNoticed(ANPCAIController* NPCController)
{
OnNoticed.Broadcast(NPCController);
@@ -57,6 +57,10 @@ public:
UPROPERTY(EditDefaultsOnly, Category = "Input")
UInputAction* InteractAction;
// Temporary dev entry to open the phone; replace with phone-slot interaction in Phase 8 (GDD §9 / §6.5).
UPROPERTY(EditDefaultsOnly, Category = "Input")
UInputAction* PhoneAction;
// Clothing slot meshes are spawned per equipped slot at runtime by ClothingVisualsComponent.
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Clothing")
UClothingVisualsComponent* ClothingVisualsComponent;
@@ -140,6 +144,7 @@ private:
void OnCrouchToggle(const FInputActionValue& Value);
void OnEquipmentPress(const FInputActionValue& Value);
void OnInteractPress(const FInputActionValue& Value);
void OnPhonePress(const FInputActionValue& Value);
bool CheckSight(const FVector& StartLocation, const FVector& EndLocation, FHitResult& HitResult, const AActor* IgnoreActor);