From 878060d7ac8cc4f4679f5d5305893cd235d0bc79 Mon Sep 17 00:00:00 2001 From: koritsa Date: Tue, 26 May 2026 18:52:37 +0300 Subject: [PATCH] Started rework of clothing slots and UI --- Config/DefaultGame.ini | 7 ++ Content/Blueprints/Player/BP_Player.uasset | 4 +- .../CommonUI/GamepadControllerData.uasset | 3 + .../Input/CommonUI/InputActionDomain.uasset | 3 + .../CommonUI/InputActionDomainTable.uasset | 3 + .../CommonUI/KeyboardControllerData.uasset | 3 + .../NakedDesireInputActionDataBase.uasset | 3 + .../CommonUI/NakedDesireInputData.uasset | 3 + Content/Input/GamepadControllerData.uasset | 3 - Content/Input/InputActionDomain.uasset | 3 - Content/Input/InputActionDomainTable.uasset | 3 - Content/Input/KeyboardControllerData.uasset | 3 - .../NakedDesireInputActionDataBase.uasset | 3 - Content/Input/NakedDesireInputData.uasset | 3 - Content/InputActionDomainTable.uasset | 4 +- Content/NakedDesireInputData.uasset | 4 +- Content/Test/Maps/TestLevel.umap | 2 +- .../Interaction/WBP_InteractionTrigger.uasset | 4 +- Content/UI/RadialMenu/WBP_RadialMenu.uasset | 4 +- Content/UI/Tabs/WBP_TabList.uasset | 4 +- Source/NakedDesire/Clothing/ClothingItem.h | 2 +- .../NakedDesire/Clothing/ClothingManager.cpp | 47 ++++++-- Source/NakedDesire/Clothing/ClothingManager.h | 5 +- .../NakedDesire/Clothing/ClothingSlotData.h | 23 ++-- .../Clothing/ClothingSlotsData.cpp | 4 + .../NakedDesire/Clothing/ClothingSlotsData.h | 34 ++++++ .../Player/NakedDesireCharacter.cpp | 111 +++--------------- .../NakedDesire/Player/NakedDesireCharacter.h | 6 +- .../UI/Inventory/EquipmentPanelWidget.cpp | 4 + .../UI/Inventory/EquipmentPanelWidget.h | 16 +++ .../UI/Inventory/EquipmentSlotWidget.cpp | 35 ++++++ .../UI/Inventory/EquipmentSlotWidget.h | 43 +++++++ .../UI/Inventory/InventoryPanelWidget.cpp | 4 + .../UI/Inventory/InventoryPanelWidget.h | 16 +++ .../UI/Inventory/InventoryScreenWidget.cpp | 1 + .../UI/Inventory/InventoryScreenWidget.h | 11 ++ .../UI/RadialMenu/RadialMenuController.h | 1 - 37 files changed, 280 insertions(+), 152 deletions(-) create mode 100644 Content/Input/CommonUI/GamepadControllerData.uasset create mode 100644 Content/Input/CommonUI/InputActionDomain.uasset create mode 100644 Content/Input/CommonUI/InputActionDomainTable.uasset create mode 100644 Content/Input/CommonUI/KeyboardControllerData.uasset create mode 100644 Content/Input/CommonUI/NakedDesireInputActionDataBase.uasset create mode 100644 Content/Input/CommonUI/NakedDesireInputData.uasset delete mode 100644 Content/Input/GamepadControllerData.uasset delete mode 100644 Content/Input/InputActionDomain.uasset delete mode 100644 Content/Input/InputActionDomainTable.uasset delete mode 100644 Content/Input/KeyboardControllerData.uasset delete mode 100644 Content/Input/NakedDesireInputActionDataBase.uasset delete mode 100644 Content/Input/NakedDesireInputData.uasset create mode 100644 Source/NakedDesire/Clothing/ClothingSlotsData.cpp create mode 100644 Source/NakedDesire/Clothing/ClothingSlotsData.h create mode 100644 Source/NakedDesire/UI/Inventory/EquipmentPanelWidget.cpp create mode 100644 Source/NakedDesire/UI/Inventory/EquipmentPanelWidget.h create mode 100644 Source/NakedDesire/UI/Inventory/EquipmentSlotWidget.cpp create mode 100644 Source/NakedDesire/UI/Inventory/EquipmentSlotWidget.h create mode 100644 Source/NakedDesire/UI/Inventory/InventoryPanelWidget.cpp create mode 100644 Source/NakedDesire/UI/Inventory/InventoryPanelWidget.h create mode 100644 Source/NakedDesire/UI/Inventory/InventoryScreenWidget.cpp create mode 100644 Source/NakedDesire/UI/Inventory/InventoryScreenWidget.h diff --git a/Config/DefaultGame.ini b/Config/DefaultGame.ini index 9dbbcc5a..2cf17a75 100644 --- a/Config/DefaultGame.ini +++ b/Config/DefaultGame.ini @@ -4,6 +4,13 @@ bAutoLoadData=True [/Script/EngineSettings.GeneralProjectSettings] ProjectID=305A61484AE3739092FF13931B45C2C6 +ProjectName=Naked Desire +CompanyName=Naked People Team +CompanyDistinguishedName=Naked People Team +Homepage=naked-people-team.in +CopyrightNotice=© 2025 Naked People Team. All Rights Reserved. +ProjectDisplayedTitle=NSLOCTEXT("[/Script/EngineSettings]", "67F2166BC54742EF9F59D9A524233B35", "Naked Desire") +ProjectDebugTitleInfo=NSLOCTEXT("[/Script/EngineSettings]", "6D0073BB1F41C8C4E21284B87D77ED5C", "Naked Desire") [/Script/CommonInput.CommonInputSettings] InputData=/Game/Input/NakedDesireInputData.NakedDesireInputData_C diff --git a/Content/Blueprints/Player/BP_Player.uasset b/Content/Blueprints/Player/BP_Player.uasset index 3e9175b8..bbb92836 100644 --- a/Content/Blueprints/Player/BP_Player.uasset +++ b/Content/Blueprints/Player/BP_Player.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:48674b96b684f2177456daf2a5beb6f93664cac47b2c80debf1a5cc3214ee36a -size 68791 +oid sha256:82682b147aed95fa9e7c3e7c8fb82c6e4b201c1d4d9d3b60e4a5e260a9ea844e +size 68773 diff --git a/Content/Input/CommonUI/GamepadControllerData.uasset b/Content/Input/CommonUI/GamepadControllerData.uasset new file mode 100644 index 00000000..ceb23e71 --- /dev/null +++ b/Content/Input/CommonUI/GamepadControllerData.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ddc735ed14c478be3b06afc6b042e6b8a9688f73effcd5a87b8a425b12e5c720 +size 13497 diff --git a/Content/Input/CommonUI/InputActionDomain.uasset b/Content/Input/CommonUI/InputActionDomain.uasset new file mode 100644 index 00000000..68ff3e10 --- /dev/null +++ b/Content/Input/CommonUI/InputActionDomain.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c7782bdbadca3c0b81eae22ccb6aabdd16314236a44e56be551c530fbab3e032 +size 1218 diff --git a/Content/Input/CommonUI/InputActionDomainTable.uasset b/Content/Input/CommonUI/InputActionDomainTable.uasset new file mode 100644 index 00000000..9afd1b3a --- /dev/null +++ b/Content/Input/CommonUI/InputActionDomainTable.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c8ac285cc5aa69d52fe267a79279594cda3c82ffcbe7352db504815324b25ae6 +size 1560 diff --git a/Content/Input/CommonUI/KeyboardControllerData.uasset b/Content/Input/CommonUI/KeyboardControllerData.uasset new file mode 100644 index 00000000..1c616542 --- /dev/null +++ b/Content/Input/CommonUI/KeyboardControllerData.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c9422ec859f9c6e7cf719203430158bcc12f87411194183bdee8850495d98ba +size 13032 diff --git a/Content/Input/CommonUI/NakedDesireInputActionDataBase.uasset b/Content/Input/CommonUI/NakedDesireInputActionDataBase.uasset new file mode 100644 index 00000000..cc16b8d3 --- /dev/null +++ b/Content/Input/CommonUI/NakedDesireInputActionDataBase.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:63ea1798079df4745378235cd1ca9b58e644d3a37732f7049918172f68192ddb +size 30199 diff --git a/Content/Input/CommonUI/NakedDesireInputData.uasset b/Content/Input/CommonUI/NakedDesireInputData.uasset new file mode 100644 index 00000000..5551ca6a --- /dev/null +++ b/Content/Input/CommonUI/NakedDesireInputData.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:effc4a04d5f486e46ba0d3d99ed200f60a630ad6a0f539e6907cc51c3c6baefd +size 6410 diff --git a/Content/Input/GamepadControllerData.uasset b/Content/Input/GamepadControllerData.uasset deleted file mode 100644 index b79b8fd5..00000000 --- a/Content/Input/GamepadControllerData.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:59805884590ceb6a361485587996a8aed7834c8c5cfa41660ee4ee5876f538c8 -size 13462 diff --git a/Content/Input/InputActionDomain.uasset b/Content/Input/InputActionDomain.uasset deleted file mode 100644 index e2955fe7..00000000 --- a/Content/Input/InputActionDomain.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:395994ac2930443653c38e1075a7ab9c034705805643655aa04a5986bd69c303 -size 1192 diff --git a/Content/Input/InputActionDomainTable.uasset b/Content/Input/InputActionDomainTable.uasset deleted file mode 100644 index f4a6a83d..00000000 --- a/Content/Input/InputActionDomainTable.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4ca142c343348aa633ae9225203c13f883e77bf3d7e298d6479f65155ecc0873 -size 1525 diff --git a/Content/Input/KeyboardControllerData.uasset b/Content/Input/KeyboardControllerData.uasset deleted file mode 100644 index 35b2d159..00000000 --- a/Content/Input/KeyboardControllerData.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5c37a35efbc48835919c17b8c6d4c4b4057ca3248b27f49aaf18a55e9530ad6f -size 12997 diff --git a/Content/Input/NakedDesireInputActionDataBase.uasset b/Content/Input/NakedDesireInputActionDataBase.uasset deleted file mode 100644 index bc951e9a..00000000 --- a/Content/Input/NakedDesireInputActionDataBase.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:85b48bcf4348d52491187ae21f84ef05e939f72c10ef22ff03975c17552f7e55 -size 30136 diff --git a/Content/Input/NakedDesireInputData.uasset b/Content/Input/NakedDesireInputData.uasset deleted file mode 100644 index 328f22f9..00000000 --- a/Content/Input/NakedDesireInputData.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a1a70422b00ba94f6924a30d5d045ffe71a05018476bd9ac03e411ca1f95972e -size 6366 diff --git a/Content/InputActionDomainTable.uasset b/Content/InputActionDomainTable.uasset index 59826297..0d9265a9 100644 --- a/Content/InputActionDomainTable.uasset +++ b/Content/InputActionDomainTable.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cee971c4257e51a6ed55f1574e03e255c636908e0323ae82f6bfc51f8e71ea49 -size 1391 +oid sha256:f51afb2a47397b1243cecfb480785d82d0fd60d940543e5b0f1193eda60068a8 +size 1417 diff --git a/Content/NakedDesireInputData.uasset b/Content/NakedDesireInputData.uasset index f359a5d9..298635f3 100644 --- a/Content/NakedDesireInputData.uasset +++ b/Content/NakedDesireInputData.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4e11a9ad31e35babde0dccf24a3cb4714a9512393a780acdb74405db23953a27 -size 2336 +oid sha256:b9277c1acde5c238d52259d489a826a7447f619bb1401c9b7247f3e24855c3a7 +size 2389 diff --git a/Content/Test/Maps/TestLevel.umap b/Content/Test/Maps/TestLevel.umap index 1bb17095..a34e8fbc 100644 --- a/Content/Test/Maps/TestLevel.umap +++ b/Content/Test/Maps/TestLevel.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:014e294219a11647ac0d0b4641c74ee0f9a9e7a354ee9183b621a07c838c9c89 +oid sha256:b869e90cd761888424506269988687dd9d913e4fee1da3f525a396a9c6f91c9e size 49583 diff --git a/Content/UI/Interaction/WBP_InteractionTrigger.uasset b/Content/UI/Interaction/WBP_InteractionTrigger.uasset index d5085ac9..bd07adb3 100644 --- a/Content/UI/Interaction/WBP_InteractionTrigger.uasset +++ b/Content/UI/Interaction/WBP_InteractionTrigger.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bf54d8f9d1eb2289d4f5021fa50073dbad51b432a9687bbd5362a70d17047c7e -size 13022 +oid sha256:fbdc256c5d21bf6d619f1c63defe9ca3b06a99199cfa7b1fe51f466e27cfb7a7 +size 13020 diff --git a/Content/UI/RadialMenu/WBP_RadialMenu.uasset b/Content/UI/RadialMenu/WBP_RadialMenu.uasset index 79a47e0f..37bb4945 100644 --- a/Content/UI/RadialMenu/WBP_RadialMenu.uasset +++ b/Content/UI/RadialMenu/WBP_RadialMenu.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2426e58602270a395874d8a4ce31321282ca6ccca901c0a09ddbd6e288e60267 -size 24939 +oid sha256:169775f5e76ae2a13cb4bb0066c7d3d23ee71d1390046dead0dc2b6d885339a3 +size 24948 diff --git a/Content/UI/Tabs/WBP_TabList.uasset b/Content/UI/Tabs/WBP_TabList.uasset index eaca98fc..be37dce8 100644 --- a/Content/UI/Tabs/WBP_TabList.uasset +++ b/Content/UI/Tabs/WBP_TabList.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:064c9df775f5a3db64fb1d2c9b304551a42aad34e153b9b26ba773b35a6b4679 -size 96193 +oid sha256:1d112be77afa242ed9ef2bacbdfe6711a0f4934ff5e74362cc59109c00ee8e81 +size 95967 diff --git a/Source/NakedDesire/Clothing/ClothingItem.h b/Source/NakedDesire/Clothing/ClothingItem.h index f47ae768..9e6397e7 100644 --- a/Source/NakedDesire/Clothing/ClothingItem.h +++ b/Source/NakedDesire/Clothing/ClothingItem.h @@ -77,7 +77,7 @@ public: FText Name; UPROPERTY(EditDefaultsOnly, BlueprintReadOnly) - UTexture2D* Icon; + TObjectPtr Icon; UPROPERTY(EditDefaultsOnly, BlueprintReadOnly) EClothingSlotType SlotType; diff --git a/Source/NakedDesire/Clothing/ClothingManager.cpp b/Source/NakedDesire/Clothing/ClothingManager.cpp index 9d4bc102..d67f4f8a 100644 --- a/Source/NakedDesire/Clothing/ClothingManager.cpp +++ b/Source/NakedDesire/Clothing/ClothingManager.cpp @@ -6,6 +6,7 @@ #include "ClothingItemInstance.h" #include "GameFramework/Character.h" #include "Kismet/GameplayStatics.h" +#include "NakedDesire/Player/NakedDesireCharacter.h" #include "NakedDesire/SaveGame/GlobalSaveGameData.h" #include "NakedDesire/SaveGame/ItemSaveRecord.h" #include "NakedDesire/SaveGame/SaveSubsystem.h" @@ -97,6 +98,37 @@ float UClothingManager::GetHeelHeight() return 0; } +USkeletalMeshComponent* UClothingManager::GetMeshComponent(const EClothingSlotType SlotType) const +{ + const ANakedDesireCharacter* Player = Cast(GetOwner()); + if (!Player) + { + return nullptr; + } + switch (SlotType) + { + case EClothingSlotType::Nipples: return Player->NipplesMeshComponent; + case EClothingSlotType::Anal: return Player->AnalMeshComponent; + case EClothingSlotType::Vagina: return Player->VaginaMeshComponent; + case EClothingSlotType::Head: return Player->HeadMeshComponent; + case EClothingSlotType::Neck: return Player->NeckMeshComponent; + case EClothingSlotType::Face: return Player->FaceMeshComponent; + case EClothingSlotType::Eyes: return Player->EyesMeshComponent; + case EClothingSlotType::Bodysuit: return Player->BodySuitMeshComponent; + case EClothingSlotType::Top: return Player->TopMeshComponent; + case EClothingSlotType::Bottom: return Player->BottomMeshComponent; + case EClothingSlotType::UnderwearTop: return Player->UnderwearTopMeshComponent; + case EClothingSlotType::UnderwearBottom:return Player->UnderwearBottomMeshComponent; + case EClothingSlotType::Socks: return Player->SocksMeshComponent; + case EClothingSlotType::Footwear: return Player->FootwearMeshComponent; + case EClothingSlotType::Outerwear: return Player->OuterwearMeshComponent; + case EClothingSlotType::WristRestraint: return Player->WristRestraintMeshComponent; + case EClothingSlotType::AnkleRestraint: return Player->AnkleRestraintMeshComponent; + case EClothingSlotType::NeckRestraint: return Player->NeckRestraintMeshComponent; + default: return nullptr; + } +} + void UClothingManager::PutOnClothing(UClothingItemInstance* ClothingItemInstance) { if (!ClothingItemInstance) @@ -107,19 +139,20 @@ void UClothingManager::PutOnClothing(UClothingItemInstance* ClothingItemInstance FClothingSlotData ClothingSlotData; GetClothingSlotData(ClothingSlotType, ClothingSlotData); - ClothingSlotData.MeshComponent->SetSkeletalMesh(ClothingItemInstance->GetClothingItem()->SkeletalMesh); + USkeletalMeshComponent* MeshComponent = GetMeshComponent(ClothingSlotType); + MeshComponent->SetSkeletalMesh(ClothingItemInstance->GetClothingItem()->SkeletalMesh); if (!ClothingItemInstance->GetClothingItem()->Materials.IsEmpty()) { for (const TPair& Material : ClothingItemInstance->GetClothingItem()->Materials) { - ClothingSlotData.MeshComponent->SetMaterialByName(Material.Key, Material.Value); + MeshComponent->SetMaterialByName(Material.Key, Material.Value); } } - + SetClothingSlotItem(ClothingSlotType, ClothingItemInstance); if (ClothingItemInstance->GetClothingItem()->UseLeaderPose) { - ClothingSlotData.MeshComponent->SetLeaderPoseComponent(Cast(GetOwner())->GetMesh()); + MeshComponent->SetLeaderPoseComponent(Cast(GetOwner())->GetMesh()); } UClothingItem* ClothingItem = ClothingItemInstance->GetClothingItem(); @@ -177,13 +210,13 @@ UClothingItemInstance* UClothingManager::RemoveClothing(const EClothingSlotType UClothingItemInstance* ClothingItemInstance = ClothingSlotData.ClothingItemInstance; SetClothingSlotItem(ClothingSlotType, nullptr); - - USkeletalMeshComponent* MeshComponent = ClothingSlotData.MeshComponent; + + USkeletalMeshComponent* MeshComponent = GetMeshComponent(ClothingSlotType); MeshComponent->SetSkeletalMesh(nullptr); if (ClothingItemInstance->GetClothingItem()->UseLeaderPose) { - ClothingSlotData.MeshComponent->SetLeaderPoseComponent(nullptr); + MeshComponent->SetLeaderPoseComponent(nullptr); } OnClothingUnequip.Broadcast(ClothingItemInstance); diff --git a/Source/NakedDesire/Clothing/ClothingManager.h b/Source/NakedDesire/Clothing/ClothingManager.h index 8ba5e4eb..21e39073 100644 --- a/Source/NakedDesire/Clothing/ClothingManager.h +++ b/Source/NakedDesire/Clothing/ClothingManager.h @@ -27,7 +27,7 @@ public: UPROPERTY(BlueprintReadWrite, Category = "Clothing Manager|Clothing") USkeletalMeshComponent* RootMesh = nullptr; - UPROPERTY(BlueprintReadWrite, Category = "Clothing Manager|Clothing") + UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Clothing Manager|Clothing") TArray ClothingSlots; UPROPERTY(BlueprintAssignable) @@ -73,4 +73,7 @@ public: UFUNCTION(BlueprintPure) float GetHeelHeight(); + +private: + USkeletalMeshComponent* GetMeshComponent(EClothingSlotType SlotType) const; }; diff --git a/Source/NakedDesire/Clothing/ClothingSlotData.h b/Source/NakedDesire/Clothing/ClothingSlotData.h index afbda1b7..ed4e5f58 100644 --- a/Source/NakedDesire/Clothing/ClothingSlotData.h +++ b/Source/NakedDesire/Clothing/ClothingSlotData.h @@ -9,37 +9,32 @@ class UClothingItemInstance; enum class EClothingSlotType : uint8; -/** - * - */ USTRUCT(BlueprintType) struct NAKEDDESIRE_API FClothingSlotData { GENERATED_BODY() FClothingSlotData() - : MeshComponent(nullptr), ClothingSlotType(EClothingSlotType::Anal), ClothingItemInstance(nullptr), Name(FText::GetEmpty()) { } - - FClothingSlotData(USkeletalMeshComponent* MeshComponent, const EClothingSlotType ClothingSlotType, UClothingItemInstance* ClothingItemInstance, const FText& Name) + + FClothingSlotData(const EClothingSlotType ClothingSlotType, const FText& Name, UTexture2D* Icon = nullptr) { - this->MeshComponent = MeshComponent; this->ClothingSlotType = ClothingSlotType; - this->ClothingItemInstance = ClothingItemInstance; this->Name = Name; + this->Icon = Icon; } - UPROPERTY(BlueprintReadWrite, Category = "Clothing") - TObjectPtr MeshComponent = nullptr; - - UPROPERTY(BlueprintReadWrite, Category = "Clothing") + UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Clothing") EClothingSlotType ClothingSlotType = EClothingSlotType::Anal; - UPROPERTY(BlueprintReadWrite, Category = "Clothing") + UPROPERTY(BlueprintReadOnly, Category = "Clothing") TObjectPtr ClothingItemInstance = nullptr; - UPROPERTY(BlueprintReadWrite, Category = "Clothing") + UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Clothing") FText Name = FText::GetEmpty(); + + UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Clothing") + TObjectPtr Icon = nullptr; }; diff --git a/Source/NakedDesire/Clothing/ClothingSlotsData.cpp b/Source/NakedDesire/Clothing/ClothingSlotsData.cpp new file mode 100644 index 00000000..0dff1d8e --- /dev/null +++ b/Source/NakedDesire/Clothing/ClothingSlotsData.cpp @@ -0,0 +1,4 @@ +// © 2025 Naked People Team. All Rights Reserved. + + +#include "ClothingSlotsData.h" diff --git a/Source/NakedDesire/Clothing/ClothingSlotsData.h b/Source/NakedDesire/Clothing/ClothingSlotsData.h new file mode 100644 index 00000000..6e56e943 --- /dev/null +++ b/Source/NakedDesire/Clothing/ClothingSlotsData.h @@ -0,0 +1,34 @@ +// © 2025 Naked People Team. All Rights Reserved. + +#pragma once + +#include "CoreMinimal.h" +#include "ClothingSlotType.h" +#include "Engine/DataAsset.h" +#include "ClothingSlotsData.generated.h" + +USTRUCT() +struct NAKEDDESIRE_API FClothingSlotData +{ + GENERATED_BODY() + + FClothingSlotData() + { + } + + UPROPERTY(EditDefaultsOnly, Category = "Clothing") + UTexture2D Icon; + + UPROPERTY(EditDefaultsOnly, Category = "Clothing") + FText Name; +}; + +UCLASS() +class NAKEDDESIRE_API UClothingSlotsData : public UPrimaryDataAsset +{ + GENERATED_BODY() + +public: + UPROPERTY(EditDefaultsOnly, Category = "Clothing") + TMap ClothingSlotsData; +}; diff --git a/Source/NakedDesire/Player/NakedDesireCharacter.cpp b/Source/NakedDesire/Player/NakedDesireCharacter.cpp index 64dd4e16..8df492db 100644 --- a/Source/NakedDesire/Player/NakedDesireCharacter.cpp +++ b/Source/NakedDesire/Player/NakedDesireCharacter.cpp @@ -18,6 +18,7 @@ #include "NakedDesire/Global/Constants.h" #include "NakedDesire/Global/NakedDesireUserSettings.h" #include "NakedDesire/UI/RadialMenu/RadialMenuController.h" +#include "NakedDesire/Clothing/ClothingSlotWidgetsInfo.h" #include "Perception/AIPerceptionStimuliSourceComponent.h" #include "Perception/AISense_Sight.h" @@ -163,8 +164,6 @@ void ANakedDesireCharacter::BeginPlay() StimuliSourceComponent->RegisterForSense(TSubclassOf()); StimuliSourceComponent->RegisterWithPerceptionSystem(); - SetupClothingSlots(); - ClothingManager->OnClothingEquip.AddUniqueDynamic(this, &ANakedDesireCharacter::OnClothingEquip); ClothingManager->OnClothingUnequip.AddUniqueDynamic(this, &ANakedDesireCharacter::OnClothingUnequip); @@ -368,105 +367,25 @@ void ANakedDesireCharacter::OnCrouchToggle(const FInputActionValue& Value) void ANakedDesireCharacter::OnEquipmentPress(const FInputActionValue& Value) { + BuildRadialMenuEntries(); RadialMenuController->OpenMenu(); } -void ANakedDesireCharacter::SetupClothingSlots() +void ANakedDesireCharacter::BuildRadialMenuEntries() { -#define LOCTEXT_NAMESPACE "ClothingSlots" + TArray Entries; - ClothingManager->ClothingSlots.Add( - FClothingSlotData( - NipplesMeshComponent, EClothingSlotType::Nipples, - nullptr, - LOCTEXT("Nipples", "Nipples"))); - ClothingManager->ClothingSlots.Add( - FClothingSlotData( - AnalMeshComponent, EClothingSlotType::Anal, - nullptr, - LOCTEXT("Anal", "Anal"))); - ClothingManager->ClothingSlots.Add( - FClothingSlotData( - VaginaMeshComponent, EClothingSlotType::Vagina, - nullptr, - LOCTEXT("Vagina", "Vagina"))); - ClothingManager->ClothingSlots.Add( - FClothingSlotData( - HeadMeshComponent, EClothingSlotType::Head, - nullptr, - LOCTEXT("Head", "Head"))); - ClothingManager->ClothingSlots.Add( - FClothingSlotData( - NeckMeshComponent, EClothingSlotType::Neck, - nullptr, - LOCTEXT("Neck", "Neck"))); - ClothingManager->ClothingSlots.Add( - FClothingSlotData( - FaceMeshComponent, EClothingSlotType::Face, - nullptr, - LOCTEXT("Face", "Face"))); - ClothingManager->ClothingSlots.Add( - FClothingSlotData( - EyesMeshComponent, EClothingSlotType::Eyes, - nullptr, - LOCTEXT("Eyes", "Eyes"))); - ClothingManager->ClothingSlots.Add( - FClothingSlotData( - BodySuitMeshComponent, EClothingSlotType::Bodysuit, - nullptr, - LOCTEXT("Bodysuit", "Bodysuit"))); - ClothingManager->ClothingSlots.Add( - FClothingSlotData( - TopMeshComponent, EClothingSlotType::Top, - nullptr, - LOCTEXT("Top", "Top"))); - ClothingManager->ClothingSlots.Add( - FClothingSlotData( - BottomMeshComponent, EClothingSlotType::Bottom, - nullptr, - LOCTEXT("Bottom", "Bottom"))); - ClothingManager->ClothingSlots.Add( - FClothingSlotData( - UnderwearTopMeshComponent, EClothingSlotType::UnderwearTop, - nullptr, - LOCTEXT("UnderwearTop", "UnderwearTop"))); - ClothingManager->ClothingSlots.Add( - FClothingSlotData( - UnderwearBottomMeshComponent, EClothingSlotType::UnderwearBottom, - nullptr, - LOCTEXT("UnderwearBottom", "UnderwearBottom"))); - ClothingManager->ClothingSlots.Add( - FClothingSlotData( - SocksMeshComponent, EClothingSlotType::Socks, - nullptr, - LOCTEXT("Socks", "Socks"))); - ClothingManager->ClothingSlots.Add( - FClothingSlotData( - FootwearMeshComponent, EClothingSlotType::Footwear, - nullptr, - LOCTEXT("Footwear", "Footwear"))); - ClothingManager->ClothingSlots.Add( - FClothingSlotData( - FootwearMeshComponent, EClothingSlotType::Outerwear, - nullptr, - LOCTEXT("Outerwear", "Outerwear"))); - ClothingManager->ClothingSlots.Add( - FClothingSlotData( - FootwearMeshComponent, EClothingSlotType::WristRestraint, - nullptr, - LOCTEXT("WristRestraint", "WristRestraint"))); - ClothingManager->ClothingSlots.Add( - FClothingSlotData( - FootwearMeshComponent, EClothingSlotType::AnkleRestraint, - nullptr, - LOCTEXT("AnkleRestraint", "AnkleRestraint"))); - ClothingManager->ClothingSlots.Add( - FClothingSlotData( - FootwearMeshComponent, EClothingSlotType::NeckRestraint, - nullptr, - LOCTEXT("NeckRestraint", "NeckRestraint"))); - -#undef LOCTEXT_NAMESPACE + for (const FClothingSlotData& SlotData : ClothingManager->ClothingSlots) + { + FRadialMenuEntry Entry; + Entry.bEnabled = SlotData.ClothingItemInstance != nullptr; + Entry.DisplayName = SlotData.Name; + Entry.Icon = SlotData.ClothingItemInstance ? SlotData.ClothingItemInstance->GetClothingItem()->Icon : SlotData.Icon; + Entry.ItemId = FName(SlotData.Name.ToString()); + Entries.Push(Entry); + } + + RadialMenuController->Entries = Entries; } void ANakedDesireCharacter::NotifyNoticed(ANPCAIController* NPCController) diff --git a/Source/NakedDesire/Player/NakedDesireCharacter.h b/Source/NakedDesire/Player/NakedDesireCharacter.h index addff674..32246783 100644 --- a/Source/NakedDesire/Player/NakedDesireCharacter.h +++ b/Source/NakedDesire/Player/NakedDesireCharacter.h @@ -20,6 +20,7 @@ struct FClothingSlotData; class UInteractionManager; class UClothingPickerWidget; class UClothingManager; +class UClothingSlotInfo; class UStatsManager; class UMissionsManager; class ANPCAIController; @@ -122,6 +123,9 @@ public: UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Censorship") UStaticMeshComponent* AnalCensorship; + UPROPERTY(EditDefaultsOnly, Category = "Clothing") + TObjectPtr SlotInfo; + // Components UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Clothing") UClothingManager* ClothingManager; @@ -201,7 +205,7 @@ private: void OnCrouchToggle(const FInputActionValue& Value); void OnEquipmentPress(const FInputActionValue& Value); - void SetupClothingSlots(); + void BuildRadialMenuEntries(); bool CheckSight(const FVector& StartLocation, const FVector& EndLocation, FHitResult& HitResult, const AActor* IgnoreActor); }; diff --git a/Source/NakedDesire/UI/Inventory/EquipmentPanelWidget.cpp b/Source/NakedDesire/UI/Inventory/EquipmentPanelWidget.cpp new file mode 100644 index 00000000..46aa3dd3 --- /dev/null +++ b/Source/NakedDesire/UI/Inventory/EquipmentPanelWidget.cpp @@ -0,0 +1,4 @@ +// © 2025 Naked People Team. All Rights Reserved. + + +#include "EquipmentPanelWidget.h" diff --git a/Source/NakedDesire/UI/Inventory/EquipmentPanelWidget.h b/Source/NakedDesire/UI/Inventory/EquipmentPanelWidget.h new file mode 100644 index 00000000..a9595a5a --- /dev/null +++ b/Source/NakedDesire/UI/Inventory/EquipmentPanelWidget.h @@ -0,0 +1,16 @@ +// © 2025 Naked People Team. All Rights Reserved. + +#pragma once + +#include "CoreMinimal.h" +#include "CommonUserWidget.h" +#include "EquipmentPanelWidget.generated.h" + +/** + * + */ +UCLASS() +class NAKEDDESIRE_API UEquipmentPanelWidget : public UCommonUserWidget +{ + GENERATED_BODY() +}; diff --git a/Source/NakedDesire/UI/Inventory/EquipmentSlotWidget.cpp b/Source/NakedDesire/UI/Inventory/EquipmentSlotWidget.cpp new file mode 100644 index 00000000..2abada19 --- /dev/null +++ b/Source/NakedDesire/UI/Inventory/EquipmentSlotWidget.cpp @@ -0,0 +1,35 @@ +// © 2025 Naked People Team. All Rights Reserved. + + +#include "EquipmentSlotWidget.h" +#include "NakedDesire/Clothing/ClothingItem.h" +#include "NakedDesire/Clothing/ClothingItemInstance.h" +#include "NakedDesire/Clothing/ClothingSlotsData.h" + +void UEquipmentSlotWidget::SetItem(UClothingItemInstance* InItem) +{ + ClothingItemInstance = InItem; + + IconImage->SetBrushFromTexture(InItem->GetClothingItem()->Icon); +} + +void UEquipmentSlotWidget::ClearItem() +{ + ClothingItemInstance = nullptr; +} + +void UEquipmentSlotWidget::NativeOnClicked() +{ + Super::NativeOnClicked(); +} + +void UEquipmentSlotWidget::NativePreConstruct() +{ + Super::NativePreConstruct(); + + if (!ClothingSlotsData->ClothingSlotsData.Contains(SlotType)) + return; + + FClothingSlotData& SlotData = ClothingSlotsData->ClothingSlotsData[SlotType]; + PlaceholderImage->SetBrushFromTexture(&SlotData.Icon); +} diff --git a/Source/NakedDesire/UI/Inventory/EquipmentSlotWidget.h b/Source/NakedDesire/UI/Inventory/EquipmentSlotWidget.h new file mode 100644 index 00000000..567c15b0 --- /dev/null +++ b/Source/NakedDesire/UI/Inventory/EquipmentSlotWidget.h @@ -0,0 +1,43 @@ +// © 2025 Naked People Team. All Rights Reserved. + +#pragma once + +#include "CoreMinimal.h" +#include "CommonButtonBase.h" +#include "Components/Image.h" +#include "NakedDesire/Clothing/BodyPart.h" +#include "NakedDesire/Clothing/ClothingSlotType.h" +#include "EquipmentSlotWidget.generated.h" + +class UClothingSlotsData; +class UClothingItemInstance; + +UCLASS(Abstract) +class NAKEDDESIRE_API UEquipmentSlotWidget : public UCommonButtonBase +{ + GENERATED_BODY() + +public: + void SetItem(UClothingItemInstance* InItem); + void ClearItem(); + +protected: + virtual void NativeOnClicked() override; + virtual void NativePreConstruct() override; + + UPROPERTY(EditDefaultsOnly) + TObjectPtr ClothingSlotsData; + +private: + UPROPERTY(meta = (BindWIdget)) + TObjectPtr PlaceholderImage; + + UPROPERTY(meta = (BindWIdget)) + TObjectPtr IconImage; + + UPROPERTY() + TObjectPtr ClothingItemInstance = nullptr; + + UPROPERTY() + EClothingSlotType SlotType = EClothingSlotType::Anal; +}; diff --git a/Source/NakedDesire/UI/Inventory/InventoryPanelWidget.cpp b/Source/NakedDesire/UI/Inventory/InventoryPanelWidget.cpp new file mode 100644 index 00000000..cee8886f --- /dev/null +++ b/Source/NakedDesire/UI/Inventory/InventoryPanelWidget.cpp @@ -0,0 +1,4 @@ +// © 2025 Naked People Team. All Rights Reserved. + + +#include "InventoryPanelWidget.h" diff --git a/Source/NakedDesire/UI/Inventory/InventoryPanelWidget.h b/Source/NakedDesire/UI/Inventory/InventoryPanelWidget.h new file mode 100644 index 00000000..1c219200 --- /dev/null +++ b/Source/NakedDesire/UI/Inventory/InventoryPanelWidget.h @@ -0,0 +1,16 @@ +// © 2025 Naked People Team. All Rights Reserved. + +#pragma once + +#include "CoreMinimal.h" +#include "CommonUserWidget.h" +#include "InventoryPanelWidget.generated.h" + +/** + * + */ +UCLASS() +class NAKEDDESIRE_API UInventoryPanelWidget : public UCommonUserWidget +{ + GENERATED_BODY() +}; diff --git a/Source/NakedDesire/UI/Inventory/InventoryScreenWidget.cpp b/Source/NakedDesire/UI/Inventory/InventoryScreenWidget.cpp new file mode 100644 index 00000000..e235e395 --- /dev/null +++ b/Source/NakedDesire/UI/Inventory/InventoryScreenWidget.cpp @@ -0,0 +1 @@ +#include "InventoryScreenWidget.h" diff --git a/Source/NakedDesire/UI/Inventory/InventoryScreenWidget.h b/Source/NakedDesire/UI/Inventory/InventoryScreenWidget.h new file mode 100644 index 00000000..07f37123 --- /dev/null +++ b/Source/NakedDesire/UI/Inventory/InventoryScreenWidget.h @@ -0,0 +1,11 @@ +#pragma once + +#include "CoreMinimal.h" +#include "CommonActivatableWidget.h" +#include "InventoryScreenWidget.generated.h" + +UCLASS() +class NAKEDDESIRE_API UInventoryScreenWidget : public UCommonActivatableWidget +{ + GENERATED_BODY() +}; diff --git a/Source/NakedDesire/UI/RadialMenu/RadialMenuController.h b/Source/NakedDesire/UI/RadialMenu/RadialMenuController.h index 349b8e4e..bdcbad68 100644 --- a/Source/NakedDesire/UI/RadialMenu/RadialMenuController.h +++ b/Source/NakedDesire/UI/RadialMenu/RadialMenuController.h @@ -103,7 +103,6 @@ public: UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Radial Menu|Tuning") TSubclassOf WidgetClass; -protected: virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;