setup equipment ui

This commit is contained in:
koritsa
2026-05-27 16:20:10 +03:00
committed by koritsa
parent b161d021c4
commit 23f709bd61
134 changed files with 464 additions and 354 deletions
@@ -2,3 +2,63 @@
#include "EquipmentPanelWidget.h"
#include "EquipmentSlotWidget.h"
void UEquipmentPanelWidget::NativeConstruct()
{
Super::NativeConstruct();
InitSlotTypes();
const TArray<UEquipmentSlotWidget*> AllSlots = {
NipplesSlot, AnalSlot, VaginaSlot,
HeadSlot, NeckSlot, FaceSlot, EyesSlot,
BodysuitSlot, TopSlot, BottomSlot,
UnderwearTopSlot, UnderwearBottomSlot,
SocksSlot, FootwearSlot, OuterwearSlot,
WristRestraintSlot, AnkleRestraintSlot, NeckRestraintSlot
};
for (UEquipmentSlotWidget* Slot : AllSlots)
{
if (Slot)
{
Slot->OnEquipmentSlotClicked.BindUObject(this, &UEquipmentPanelWidget::HandleSlotClicked);
}
}
}
void UEquipmentPanelWidget::NativePreConstruct()
{
Super::NativePreConstruct();
InitSlotTypes();
}
void UEquipmentPanelWidget::HandleSlotClicked(UEquipmentSlotWidget* SlotWidget)
{
OnSlotClicked.ExecuteIfBound(SlotWidget);
}
void UEquipmentPanelWidget::InitSlotTypes()
{
if (NipplesSlot) NipplesSlot->SetSlotType(EClothingSlotType::Nipples);
if (AnalSlot) AnalSlot->SetSlotType(EClothingSlotType::Anal);
if (VaginaSlot) VaginaSlot->SetSlotType(EClothingSlotType::Vagina);
if (HeadSlot) HeadSlot->SetSlotType(EClothingSlotType::Head);
if (NeckSlot) NeckSlot->SetSlotType(EClothingSlotType::Neck);
if (FaceSlot) FaceSlot->SetSlotType(EClothingSlotType::Face);
if (EyesSlot) EyesSlot->SetSlotType(EClothingSlotType::Eyes);
if (BodysuitSlot) BodysuitSlot->SetSlotType(EClothingSlotType::Bodysuit);
if (TopSlot) TopSlot->SetSlotType(EClothingSlotType::Top);
if (BottomSlot) BottomSlot->SetSlotType(EClothingSlotType::Bottom);
if (UnderwearTopSlot) UnderwearTopSlot->SetSlotType(EClothingSlotType::UnderwearTop);
if (UnderwearBottomSlot) UnderwearBottomSlot->SetSlotType(EClothingSlotType::UnderwearBottom);
if (SocksSlot) SocksSlot->SetSlotType(EClothingSlotType::Socks);
if (FootwearSlot) FootwearSlot->SetSlotType(EClothingSlotType::Footwear);
if (OuterwearSlot) OuterwearSlot->SetSlotType(EClothingSlotType::Outerwear);
if (WristRestraintSlot) WristRestraintSlot->SetSlotType(EClothingSlotType::WristRestraint);
if (AnkleRestraintSlot) AnkleRestraintSlot->SetSlotType(EClothingSlotType::AnkleRestraint);
if (NeckRestraintSlot) NeckRestraintSlot->SetSlotType(EClothingSlotType::NeckRestraint);
}