Started rework of clothing slots and UI
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user