Fix common ui input settings, equipment menu initialization order
This commit is contained in:
@@ -13,8 +13,8 @@ ProjectDisplayedTitle=NSLOCTEXT("[/Script/EngineSettings]", "67F2166BC54742EF9F5
|
|||||||
ProjectDebugTitleInfo=NSLOCTEXT("[/Script/EngineSettings]", "6D0073BB1F41C8C4E21284B87D77ED5C", "Naked Desire")
|
ProjectDebugTitleInfo=NSLOCTEXT("[/Script/EngineSettings]", "6D0073BB1F41C8C4E21284B87D77ED5C", "Naked Desire")
|
||||||
|
|
||||||
[/Script/CommonInput.CommonInputSettings]
|
[/Script/CommonInput.CommonInputSettings]
|
||||||
InputData=/Game/Input/NakedDesireInputData.NakedDesireInputData_C
|
InputData=/Game/Input/CommonUI/NakedDesireInputData.NakedDesireInputData_C
|
||||||
ActionDomainTable=/Game/Input/InputActionDomainTable.InputActionDomainTable
|
ActionDomainTable=/Game/Input/CommonUI/InputActionDomainTable.InputActionDomainTable
|
||||||
|
|
||||||
[CommonInputPlatformSettings_Windows CommonInputPlatformSettings]
|
[CommonInputPlatformSettings_Windows CommonInputPlatformSettings]
|
||||||
DefaultInputType=MouseAndKeyboard
|
DefaultInputType=MouseAndKeyboard
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
@@ -12,7 +12,7 @@ class NAKEDDESIRE_API ANakedDesireHUD : public AHUD
|
|||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
public:
|
public:
|
||||||
UGameLayoutWidget* GetGameLayout() const { return GameLayoutWidget; }
|
UGameLayoutWidget* GetGameLayoutWidget() const { return GameLayoutWidget; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
UPROPERTY(EditDefaultsOnly, Category = "UI")
|
UPROPERTY(EditDefaultsOnly, Category = "UI")
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
#include "NakedDesire/Global/NakedDesireHUD.h"
|
#include "NakedDesire/Global/NakedDesireHUD.h"
|
||||||
#include "NakedDesire/Global/NakedDesireUserSettings.h"
|
#include "NakedDesire/Global/NakedDesireUserSettings.h"
|
||||||
#include "NakedDesire/UI/GameLayoutWidget.h"
|
#include "NakedDesire/UI/GameLayoutWidget.h"
|
||||||
|
#include "NakedDesire/UI/HUDWidget.h"
|
||||||
#include "NakedDesire/UI/RadialMenu/RadialMenuController.h"
|
#include "NakedDesire/UI/RadialMenu/RadialMenuController.h"
|
||||||
#include "Perception/AIPerceptionStimuliSourceComponent.h"
|
#include "Perception/AIPerceptionStimuliSourceComponent.h"
|
||||||
#include "Perception/AISense_Sight.h"
|
#include "Perception/AISense_Sight.h"
|
||||||
@@ -370,7 +371,7 @@ void ANakedDesireCharacter::OnCrouchToggle(const FInputActionValue& Value)
|
|||||||
|
|
||||||
void ANakedDesireCharacter::OnEquipmentPress(const FInputActionValue& Value)
|
void ANakedDesireCharacter::OnEquipmentPress(const FInputActionValue& Value)
|
||||||
{
|
{
|
||||||
HUD->GetGameLayout()->OpenInventory();
|
HUD->GetGameLayoutWidget()->OpenInventory();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ANakedDesireCharacter::BuildRadialMenuEntries()
|
void ANakedDesireCharacter::BuildRadialMenuEntries()
|
||||||
|
|||||||
@@ -6,10 +6,7 @@
|
|||||||
#include "CommonUserWidget.h"
|
#include "CommonUserWidget.h"
|
||||||
#include "HUDWidget.generated.h"
|
#include "HUDWidget.generated.h"
|
||||||
|
|
||||||
/**
|
UCLASS(Abstract)
|
||||||
*
|
|
||||||
*/
|
|
||||||
UCLASS()
|
|
||||||
class NAKEDDESIRE_API UHUDWidget : public UCommonUserWidget
|
class NAKEDDESIRE_API UHUDWidget : public UCommonUserWidget
|
||||||
{
|
{
|
||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|||||||
@@ -4,12 +4,17 @@
|
|||||||
#include "EquipmentPanelWidget.h"
|
#include "EquipmentPanelWidget.h"
|
||||||
|
|
||||||
#include "EquipmentSlotWidget.h"
|
#include "EquipmentSlotWidget.h"
|
||||||
|
#include "Kismet/GameplayStatics.h"
|
||||||
|
#include "NakedDesire/Clothing/ClothingManager.h"
|
||||||
|
#include "NakedDesire/Player/NakedDesireCharacter.h"
|
||||||
|
|
||||||
void UEquipmentPanelWidget::NativeConstruct()
|
void UEquipmentPanelWidget::NativeConstruct()
|
||||||
{
|
{
|
||||||
Super::NativeConstruct();
|
Super::NativeConstruct();
|
||||||
|
|
||||||
InitSlotTypes();
|
InitSlotTypes();
|
||||||
|
|
||||||
|
const ANakedDesireCharacter* Player = Cast<ANakedDesireCharacter>(UGameplayStatics::GetPlayerCharacter(GetWorld(), 0));
|
||||||
|
|
||||||
const TArray<UEquipmentSlotWidget*> AllSlots = {
|
const TArray<UEquipmentSlotWidget*> AllSlots = {
|
||||||
NipplesSlot, AnalSlot, VaginaSlot,
|
NipplesSlot, AnalSlot, VaginaSlot,
|
||||||
@@ -20,11 +25,15 @@ void UEquipmentPanelWidget::NativeConstruct()
|
|||||||
WristRestraintSlot, AnkleRestraintSlot, NeckRestraintSlot
|
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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ void UEquipmentSlotWidget::SetItem(UClothingItemInstance* InItem)
|
|||||||
|
|
||||||
IconImage->SetBrushFromTexture(InItem->GetClothingItem()->Icon);
|
IconImage->SetBrushFromTexture(InItem->GetClothingItem()->Icon);
|
||||||
IconImage->SetVisibility(ESlateVisibility::SelfHitTestInvisible);
|
IconImage->SetVisibility(ESlateVisibility::SelfHitTestInvisible);
|
||||||
|
PlaceholderImage->SetVisibility(ESlateVisibility::Hidden);
|
||||||
SetIsEnabled(true);
|
SetIsEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -24,6 +25,7 @@ void UEquipmentSlotWidget::ClearItem()
|
|||||||
|
|
||||||
IconImage->SetBrushFromTexture(nullptr);
|
IconImage->SetBrushFromTexture(nullptr);
|
||||||
IconImage->SetVisibility(ESlateVisibility::Hidden);
|
IconImage->SetVisibility(ESlateVisibility::Hidden);
|
||||||
|
PlaceholderImage->SetVisibility(ESlateVisibility::SelfHitTestInvisible);
|
||||||
SetIsEnabled(false);
|
SetIsEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,9 +83,4 @@ void UEquipmentSlotWidget::NativeConstruct()
|
|||||||
|
|
||||||
Player->ClothingManager->OnClothingEquip.AddUniqueDynamic(this, &UEquipmentSlotWidget::OnClothingEquip);
|
Player->ClothingManager->OnClothingEquip.AddUniqueDynamic(this, &UEquipmentSlotWidget::OnClothingEquip);
|
||||||
Player->ClothingManager->OnClothingUnequip.AddUniqueDynamic(this, &UEquipmentSlotWidget::OnClothingUnequip);
|
Player->ClothingManager->OnClothingUnequip.AddUniqueDynamic(this, &UEquipmentSlotWidget::OnClothingUnequip);
|
||||||
|
|
||||||
if (UClothingItemInstance* Item = Player->ClothingManager->GetSlotClothing(SlotType))
|
|
||||||
SetItem(Item);
|
|
||||||
else
|
|
||||||
ClearItem();
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,13 +37,6 @@ void UInventoryScreenWidget::NativeOnActivated()
|
|||||||
CloseMenu();
|
CloseMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UInventoryScreenWidget::NativeOnDeactivated()
|
|
||||||
{
|
|
||||||
Super::NativeOnDeactivated();
|
|
||||||
|
|
||||||
CloseMenu();
|
|
||||||
}
|
|
||||||
|
|
||||||
void UInventoryScreenWidget::HandleSlotClicked(UEquipmentSlotWidget* SlotWidget)
|
void UInventoryScreenWidget::HandleSlotClicked(UEquipmentSlotWidget* SlotWidget)
|
||||||
{
|
{
|
||||||
if (!EquipmentSlotMenuWidget || !SlotWidget)
|
if (!EquipmentSlotMenuWidget || !SlotWidget)
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ class NAKEDDESIRE_API UInventoryScreenWidget : public UCommonActivatableWidget
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void NativeOnActivated() override;
|
virtual void NativeOnActivated() override;
|
||||||
virtual void NativeOnDeactivated() override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void HandleSlotClicked(UEquipmentSlotWidget* SlotWidget);
|
void HandleSlotClicked(UEquipmentSlotWidget* SlotWidget);
|
||||||
|
|||||||
Reference in New Issue
Block a user