Started rework of clothing slots and UI
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
// © 2025 Naked People Team. All Rights Reserved.
|
||||
|
||||
|
||||
#include "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()
|
||||
};
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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<UClothingSlotsData> ClothingSlotsData;
|
||||
|
||||
private:
|
||||
UPROPERTY(meta = (BindWIdget))
|
||||
TObjectPtr<UImage> PlaceholderImage;
|
||||
|
||||
UPROPERTY(meta = (BindWIdget))
|
||||
TObjectPtr<UImage> IconImage;
|
||||
|
||||
UPROPERTY()
|
||||
TObjectPtr<UClothingItemInstance> ClothingItemInstance = nullptr;
|
||||
|
||||
UPROPERTY()
|
||||
EClothingSlotType SlotType = EClothingSlotType::Anal;
|
||||
};
|
||||
@@ -0,0 +1,4 @@
|
||||
// © 2025 Naked People Team. All Rights Reserved.
|
||||
|
||||
|
||||
#include "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()
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
#include "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()
|
||||
};
|
||||
Reference in New Issue
Block a user