diff --git a/Config/DefaultGame.ini b/Config/DefaultGame.ini index 2cf17a75..86098ec2 100644 --- a/Config/DefaultGame.ini +++ b/Config/DefaultGame.ini @@ -13,8 +13,8 @@ ProjectDisplayedTitle=NSLOCTEXT("[/Script/EngineSettings]", "67F2166BC54742EF9F5 ProjectDebugTitleInfo=NSLOCTEXT("[/Script/EngineSettings]", "6D0073BB1F41C8C4E21284B87D77ED5C", "Naked Desire") [/Script/CommonInput.CommonInputSettings] -InputData=/Game/Input/NakedDesireInputData.NakedDesireInputData_C -ActionDomainTable=/Game/Input/InputActionDomainTable.InputActionDomainTable +InputData=/Game/Input/CommonUI/NakedDesireInputData.NakedDesireInputData_C +ActionDomainTable=/Game/Input/CommonUI/InputActionDomainTable.InputActionDomainTable [CommonInputPlatformSettings_Windows CommonInputPlatformSettings] DefaultInputType=MouseAndKeyboard diff --git a/Content/Input/CommonUI/InputActionDomain.uasset b/Content/Input/CommonUI/InputActionDomain.uasset index 68ff3e10..eee6fb30 100644 --- a/Content/Input/CommonUI/InputActionDomain.uasset +++ b/Content/Input/CommonUI/InputActionDomain.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c7782bdbadca3c0b81eae22ccb6aabdd16314236a44e56be551c530fbab3e032 -size 1218 +oid sha256:305d64fd7103826fb2b99760b1a31fbcc0d856fe4c0e46fbabd673dc0f3dc9d2 +size 1307 diff --git a/Content/Input/CommonUI/NakedDesireInputActionDataBase.uasset b/Content/Input/CommonUI/NakedDesireInputActionDataBase.uasset index cc16b8d3..9c04b1a2 100644 --- a/Content/Input/CommonUI/NakedDesireInputActionDataBase.uasset +++ b/Content/Input/CommonUI/NakedDesireInputActionDataBase.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:63ea1798079df4745378235cd1ca9b58e644d3a37732f7049918172f68192ddb -size 30199 +oid sha256:aad440a2730d3e0d3219a000c4f9bbd800e366574ca20b78a7bb7273838cb338 +size 30206 diff --git a/Content/UI/HUD/W_HUD.uasset b/Content/UI/HUD/W_HUD.uasset index b220a51c..785f1bc2 100644 --- a/Content/UI/HUD/W_HUD.uasset +++ b/Content/UI/HUD/W_HUD.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:821e6da0c4e677cceb8ef60e679e2f8c68370c7ced6b43702c9a3ea53cba6a67 +oid sha256:d21ba1b809f0155ca982e3162632399da9c13ede7a223357653b2b54adf75b16 size 25046 diff --git a/Content/UI/Inventory/WBP_InventoryScreen.uasset b/Content/UI/Inventory/WBP_InventoryScreen.uasset index 3790de1e..31dc5bb2 100644 --- a/Content/UI/Inventory/WBP_InventoryScreen.uasset +++ b/Content/UI/Inventory/WBP_InventoryScreen.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8e17421b11e3c16ebd0b8c6f282a2721a33bae40de5144a834d2e5817b5d0602 -size 31849 +oid sha256:22ba480da96f627664d35b9efb4a94e4645cd2fc072332191b6e3fbf299d1fc1 +size 33793 diff --git a/Source/NakedDesire/Global/NakedDesireHUD.h b/Source/NakedDesire/Global/NakedDesireHUD.h index 46aad849..9a18a354 100644 --- a/Source/NakedDesire/Global/NakedDesireHUD.h +++ b/Source/NakedDesire/Global/NakedDesireHUD.h @@ -12,7 +12,7 @@ class NAKEDDESIRE_API ANakedDesireHUD : public AHUD GENERATED_BODY() public: - UGameLayoutWidget* GetGameLayout() const { return GameLayoutWidget; } + UGameLayoutWidget* GetGameLayoutWidget() const { return GameLayoutWidget; } protected: UPROPERTY(EditDefaultsOnly, Category = "UI") diff --git a/Source/NakedDesire/Player/NakedDesireCharacter.cpp b/Source/NakedDesire/Player/NakedDesireCharacter.cpp index 705deb51..72b13302 100644 --- a/Source/NakedDesire/Player/NakedDesireCharacter.cpp +++ b/Source/NakedDesire/Player/NakedDesireCharacter.cpp @@ -20,6 +20,7 @@ #include "NakedDesire/Global/NakedDesireHUD.h" #include "NakedDesire/Global/NakedDesireUserSettings.h" #include "NakedDesire/UI/GameLayoutWidget.h" +#include "NakedDesire/UI/HUDWidget.h" #include "NakedDesire/UI/RadialMenu/RadialMenuController.h" #include "Perception/AIPerceptionStimuliSourceComponent.h" #include "Perception/AISense_Sight.h" @@ -370,7 +371,7 @@ void ANakedDesireCharacter::OnCrouchToggle(const FInputActionValue& Value) void ANakedDesireCharacter::OnEquipmentPress(const FInputActionValue& Value) { - HUD->GetGameLayout()->OpenInventory(); + HUD->GetGameLayoutWidget()->OpenInventory(); } void ANakedDesireCharacter::BuildRadialMenuEntries() diff --git a/Source/NakedDesire/UI/HUDWidget.h b/Source/NakedDesire/UI/HUDWidget.h index 03195c68..460b8d27 100644 --- a/Source/NakedDesire/UI/HUDWidget.h +++ b/Source/NakedDesire/UI/HUDWidget.h @@ -6,10 +6,7 @@ #include "CommonUserWidget.h" #include "HUDWidget.generated.h" -/** - * - */ -UCLASS() +UCLASS(Abstract) class NAKEDDESIRE_API UHUDWidget : public UCommonUserWidget { GENERATED_BODY() diff --git a/Source/NakedDesire/UI/Inventory/EquipmentPanelWidget.cpp b/Source/NakedDesire/UI/Inventory/EquipmentPanelWidget.cpp index 9aad399b..aebd56f3 100644 --- a/Source/NakedDesire/UI/Inventory/EquipmentPanelWidget.cpp +++ b/Source/NakedDesire/UI/Inventory/EquipmentPanelWidget.cpp @@ -4,12 +4,17 @@ #include "EquipmentPanelWidget.h" #include "EquipmentSlotWidget.h" +#include "Kismet/GameplayStatics.h" +#include "NakedDesire/Clothing/ClothingManager.h" +#include "NakedDesire/Player/NakedDesireCharacter.h" void UEquipmentPanelWidget::NativeConstruct() { Super::NativeConstruct(); InitSlotTypes(); + + const ANakedDesireCharacter* Player = Cast(UGameplayStatics::GetPlayerCharacter(GetWorld(), 0)); const TArray AllSlots = { NipplesSlot, AnalSlot, VaginaSlot, @@ -20,11 +25,15 @@ void UEquipmentPanelWidget::NativeConstruct() WristRestraintSlot, AnkleRestraintSlot, NeckRestraintSlot }; - for (UEquipmentSlotWidget* Slot : AllSlots) + for (UEquipmentSlotWidget* SlotWidget : AllSlots) { - if (Slot) + if (SlotWidget) { - Slot->OnEquipmentSlotClicked.BindUObject(this, &UEquipmentPanelWidget::HandleSlotClicked); + SlotWidget->OnEquipmentSlotClicked.BindUObject(this, &UEquipmentPanelWidget::HandleSlotClicked); + if (UClothingItemInstance* Item = Player->ClothingManager->GetSlotClothing(SlotWidget->GetSlotType())) + SlotWidget->SetItem(Item); + else + SlotWidget->ClearItem(); } } } diff --git a/Source/NakedDesire/UI/Inventory/EquipmentSlotWidget.cpp b/Source/NakedDesire/UI/Inventory/EquipmentSlotWidget.cpp index f4d02b04..e96e6e26 100644 --- a/Source/NakedDesire/UI/Inventory/EquipmentSlotWidget.cpp +++ b/Source/NakedDesire/UI/Inventory/EquipmentSlotWidget.cpp @@ -15,6 +15,7 @@ void UEquipmentSlotWidget::SetItem(UClothingItemInstance* InItem) IconImage->SetBrushFromTexture(InItem->GetClothingItem()->Icon); IconImage->SetVisibility(ESlateVisibility::SelfHitTestInvisible); + PlaceholderImage->SetVisibility(ESlateVisibility::Hidden); SetIsEnabled(true); } @@ -24,6 +25,7 @@ void UEquipmentSlotWidget::ClearItem() IconImage->SetBrushFromTexture(nullptr); IconImage->SetVisibility(ESlateVisibility::Hidden); + PlaceholderImage->SetVisibility(ESlateVisibility::SelfHitTestInvisible); SetIsEnabled(false); } @@ -81,9 +83,4 @@ void UEquipmentSlotWidget::NativeConstruct() Player->ClothingManager->OnClothingEquip.AddUniqueDynamic(this, &UEquipmentSlotWidget::OnClothingEquip); Player->ClothingManager->OnClothingUnequip.AddUniqueDynamic(this, &UEquipmentSlotWidget::OnClothingUnequip); - - if (UClothingItemInstance* Item = Player->ClothingManager->GetSlotClothing(SlotType)) - SetItem(Item); - else - ClearItem(); } diff --git a/Source/NakedDesire/UI/Inventory/InventoryScreenWidget.cpp b/Source/NakedDesire/UI/Inventory/InventoryScreenWidget.cpp index e2821fdd..dd9599f9 100644 --- a/Source/NakedDesire/UI/Inventory/InventoryScreenWidget.cpp +++ b/Source/NakedDesire/UI/Inventory/InventoryScreenWidget.cpp @@ -37,13 +37,6 @@ void UInventoryScreenWidget::NativeOnActivated() CloseMenu(); } -void UInventoryScreenWidget::NativeOnDeactivated() -{ - Super::NativeOnDeactivated(); - - CloseMenu(); -} - void UInventoryScreenWidget::HandleSlotClicked(UEquipmentSlotWidget* SlotWidget) { if (!EquipmentSlotMenuWidget || !SlotWidget) diff --git a/Source/NakedDesire/UI/Inventory/InventoryScreenWidget.h b/Source/NakedDesire/UI/Inventory/InventoryScreenWidget.h index 3ac88b4f..9658de45 100644 --- a/Source/NakedDesire/UI/Inventory/InventoryScreenWidget.h +++ b/Source/NakedDesire/UI/Inventory/InventoryScreenWidget.h @@ -28,7 +28,6 @@ class NAKEDDESIRE_API UInventoryScreenWidget : public UCommonActivatableWidget protected: virtual void NativeOnActivated() override; - virtual void NativeOnDeactivated() override; private: void HandleSlotClicked(UEquipmentSlotWidget* SlotWidget);