From 6f9f95ab9dffd2942a06ea9ca13443fef4102040 Mon Sep 17 00:00:00 2001 From: Marcel Hara Date: Tue, 14 Mar 2023 13:04:33 +0000 Subject: [PATCH] Attempted fix widget to merchant system --- .../Characters/Merchant/AMerchant.uasset | 4 ++-- .../Combat_UI/CombatCharacter.uasset | 4 ++-- .../Blueprints/Display_UI/BP_CrossHair.uasset | 4 ++-- .../Display_UI/BP_ImportantStats.uasset | 4 ++-- Content/Blueprints/Game_UI/WBP_Combos.uasset | 4 ++-- Content/Blueprints/Game_UI/WBP_Gear.uasset | 4 ++-- .../Blueprints/Game_UI/WBP_ItemDisplay.uasset | 4 ++-- Content/Blueprints/Game_UI/WBP_Lore.uasset | 4 ++-- .../Blueprints/Game_UI/WBP_MainWidg.uasset | 4 ++-- Content/Blueprints/Game_UI/WBP_Maps.uasset | 4 ++-- .../Game_UI/WBP_PlayerInventory.uasset | 4 ++-- .../Blueprints/Game_UI/WBP_Settings.uasset | 4 ++-- .../ItemsInWorld/BP_BuffPlacedItem.uasset | 4 ++-- .../Merchant_UI/BP_ShopSelector.uasset | 4 ++-- .../Player/BP_MyTempCharacter.uasset | 4 ++-- Content/Levels/Build.umap | 4 ++-- .../MerchantInteraction/Interaction.cpp | 4 ++-- .../PlayerTemp/TempCharacter.cpp | 13 ++++++++++ .../PlayerTemp/TempCharacter.h | 24 ++++++++++++++++--- 19 files changed, 68 insertions(+), 37 deletions(-) diff --git a/Content/Assets/Characters/Merchant/AMerchant.uasset b/Content/Assets/Characters/Merchant/AMerchant.uasset index 0013a4c..43d8fa1 100644 --- a/Content/Assets/Characters/Merchant/AMerchant.uasset +++ b/Content/Assets/Characters/Merchant/AMerchant.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e9188e10cfd8c3901e9e45e29a9befb663a72e564cbddd307ad4de963d9a0d77 -size 29149 +oid sha256:6af590f6da128baba7c4aa52d989bd4f35179f3662763478e9dd00be84ce12e6 +size 29146 diff --git a/Content/Blueprints/Combat_UI/CombatCharacter.uasset b/Content/Blueprints/Combat_UI/CombatCharacter.uasset index c5de69b..0612ee9 100644 --- a/Content/Blueprints/Combat_UI/CombatCharacter.uasset +++ b/Content/Blueprints/Combat_UI/CombatCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:13a22bdb62a49980158e1bbebab2489986a653e7a4a53c9b394a5b15dc5347de -size 125865 +oid sha256:7e9dab7a70b9bb56b67a30217052b4137f727e264c261ee66f6fcaa4c0f1d38d +size 123271 diff --git a/Content/Blueprints/Display_UI/BP_CrossHair.uasset b/Content/Blueprints/Display_UI/BP_CrossHair.uasset index 9189850..7effa0d 100644 --- a/Content/Blueprints/Display_UI/BP_CrossHair.uasset +++ b/Content/Blueprints/Display_UI/BP_CrossHair.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:55196f81c7337436eb13d58addfa806a72814afb3e9745581c23b271601bb1a6 -size 24190 +oid sha256:ebc8b81319654bead68a5f6f0544b6d71b8a58e9bda2f4e4f7c12bf64b2b2f09 +size 24335 diff --git a/Content/Blueprints/Display_UI/BP_ImportantStats.uasset b/Content/Blueprints/Display_UI/BP_ImportantStats.uasset index 7f84c8a..0c41bd3 100644 --- a/Content/Blueprints/Display_UI/BP_ImportantStats.uasset +++ b/Content/Blueprints/Display_UI/BP_ImportantStats.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dcffcfe86357f3c893f343ea448e61f1fb2e5cf96f95da554fb52e072841d4b8 -size 71202 +oid sha256:8bbee68471b3dd34a52edf9c15f46ec4a3f29eeec7e16d9451012a2522d3a4df +size 71577 diff --git a/Content/Blueprints/Game_UI/WBP_Combos.uasset b/Content/Blueprints/Game_UI/WBP_Combos.uasset index 043d787..d099f84 100644 --- a/Content/Blueprints/Game_UI/WBP_Combos.uasset +++ b/Content/Blueprints/Game_UI/WBP_Combos.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:416014c061366c2a0d666efc927427c7c9dbdf1b66b3e7148899e4e3fdb4a4c9 -size 29478 +oid sha256:e4d73d5931d9dd21b23d5a2bd1f129d11244306df1abbde12f9fccc6c44a5770 +size 29157 diff --git a/Content/Blueprints/Game_UI/WBP_Gear.uasset b/Content/Blueprints/Game_UI/WBP_Gear.uasset index 3a75d58..ef05b11 100644 --- a/Content/Blueprints/Game_UI/WBP_Gear.uasset +++ b/Content/Blueprints/Game_UI/WBP_Gear.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:36dc82fc00e11f9c7ed4431a38306da999cd5e1a38022da55d69845bef3d882e -size 28880 +oid sha256:0ae9bdd7d2686493bfaf9eb6b0fc85d63ab09f0e3e38e791b43b38cbef9329f3 +size 28765 diff --git a/Content/Blueprints/Game_UI/WBP_ItemDisplay.uasset b/Content/Blueprints/Game_UI/WBP_ItemDisplay.uasset index c885e48..e7fe941 100644 --- a/Content/Blueprints/Game_UI/WBP_ItemDisplay.uasset +++ b/Content/Blueprints/Game_UI/WBP_ItemDisplay.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e7028657fce8fc6b471ea49806f3514ed7586c10d7968452aa988edbce7271b0 -size 99181 +oid sha256:a6f17a13b99f1e37c8647a6cf334965f3129b4dc765078ffb98f83f5b2058219 +size 99375 diff --git a/Content/Blueprints/Game_UI/WBP_Lore.uasset b/Content/Blueprints/Game_UI/WBP_Lore.uasset index 3d15c19..24efc9f 100644 --- a/Content/Blueprints/Game_UI/WBP_Lore.uasset +++ b/Content/Blueprints/Game_UI/WBP_Lore.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3a1cf8c74b3a2a2846ea7362484abd01f3ec2cb699d818cf126054ddf06ffc28 -size 28773 +oid sha256:7c7fdc68dbf04b923c865045123d07bd05d632738cafabcedb9d8fbb9f5eba84 +size 28691 diff --git a/Content/Blueprints/Game_UI/WBP_MainWidg.uasset b/Content/Blueprints/Game_UI/WBP_MainWidg.uasset index 1c0ba9c..926ce49 100644 --- a/Content/Blueprints/Game_UI/WBP_MainWidg.uasset +++ b/Content/Blueprints/Game_UI/WBP_MainWidg.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2a4a9fa8152ed315f1bb653705fdad6de064d358e1cd3668958f40aae254e1df -size 138836 +oid sha256:1ecd755ec5fbf71434d3db833c07674c71782317acbe2d4b334c291b7038b6fb +size 139665 diff --git a/Content/Blueprints/Game_UI/WBP_Maps.uasset b/Content/Blueprints/Game_UI/WBP_Maps.uasset index e93b4ae..38e6756 100644 --- a/Content/Blueprints/Game_UI/WBP_Maps.uasset +++ b/Content/Blueprints/Game_UI/WBP_Maps.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2c01afbb57aabc05e93776def7df8f98081d18587f2ed9241532922d6a5b80bd -size 28804 +oid sha256:2da33c1197e5c2f65eb51d5f091771e11852bf64dfd784387bf8440fde4de5dd +size 28618 diff --git a/Content/Blueprints/Game_UI/WBP_PlayerInventory.uasset b/Content/Blueprints/Game_UI/WBP_PlayerInventory.uasset index 0f9243f..ed7ce68 100644 --- a/Content/Blueprints/Game_UI/WBP_PlayerInventory.uasset +++ b/Content/Blueprints/Game_UI/WBP_PlayerInventory.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e0e8a0e29f2b50ff5a0e180750a2add562c0d84867adf2c784460ca58466c8d4 -size 119446 +oid sha256:21798b1b466ae8316f04f6e8b48e3ac211e89bc0c1fef457facb0b88cfd98c66 +size 119127 diff --git a/Content/Blueprints/Game_UI/WBP_Settings.uasset b/Content/Blueprints/Game_UI/WBP_Settings.uasset index 7306596..b42d101 100644 --- a/Content/Blueprints/Game_UI/WBP_Settings.uasset +++ b/Content/Blueprints/Game_UI/WBP_Settings.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:45398065f09fe6c0ae4efb8f8851ff4d1468cb8d8ac0fe1dc1b43d0e00bfb587 -size 42732 +oid sha256:e4bc9ab3d8dae99641a14838f1cc661935d3d4554f989fb2edc63b7de48483d1 +size 43069 diff --git a/Content/Blueprints/Items/ItemsInWorld/BP_BuffPlacedItem.uasset b/Content/Blueprints/Items/ItemsInWorld/BP_BuffPlacedItem.uasset index 016dc00..c72efc0 100644 --- a/Content/Blueprints/Items/ItemsInWorld/BP_BuffPlacedItem.uasset +++ b/Content/Blueprints/Items/ItemsInWorld/BP_BuffPlacedItem.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ad2b40d361c7b3ad8a4c24cce72977f845a9ca15c9adb04e0ed639dbddef6c11 -size 31223 +oid sha256:ea7e5b5b8374101c5ddc1d4b250890f3a492338e58d96e55ac0c11a594e108ae +size 31298 diff --git a/Content/Blueprints/Merchant/Merchant_UI/BP_ShopSelector.uasset b/Content/Blueprints/Merchant/Merchant_UI/BP_ShopSelector.uasset index 386e056..1319aac 100644 --- a/Content/Blueprints/Merchant/Merchant_UI/BP_ShopSelector.uasset +++ b/Content/Blueprints/Merchant/Merchant_UI/BP_ShopSelector.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:619392a18bdff832f9a3f42eedf6c1a209236e31775d1bbcae6e7f50c7b2b560 -size 52765 +oid sha256:8f4053e0c2b706222529424465ec20fd601bfb76e77887ee6192cf432085cbcc +size 53377 diff --git a/Content/Blueprints/Player/BP_MyTempCharacter.uasset b/Content/Blueprints/Player/BP_MyTempCharacter.uasset index 2df15ce..1b954b1 100644 --- a/Content/Blueprints/Player/BP_MyTempCharacter.uasset +++ b/Content/Blueprints/Player/BP_MyTempCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:86f2355238fc96028acb3309b9984e9640cd82252b064f8610435373e86a4a2b -size 109345 +oid sha256:55e169ef1f8b60377331e585fef70a5a35e93571647922cd0269a7726b71503d +size 87299 diff --git a/Content/Levels/Build.umap b/Content/Levels/Build.umap index 70d8c8a..cbd8ac1 100644 --- a/Content/Levels/Build.umap +++ b/Content/Levels/Build.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0b353934b04cae18fbad51941d0dc9e8d9a1afd9dbd0e20f4f5b994bc09cad9b -size 3375665 +oid sha256:c7a44e7e4e916ef3cc70cd4b017e69a1b6487cb4bad362be87babb29a8ffea12 +size 3374905 diff --git a/Source/the_twilight_abyss/MerchantInteraction/Interaction.cpp b/Source/the_twilight_abyss/MerchantInteraction/Interaction.cpp index 55cb12a..7d152ac 100644 --- a/Source/the_twilight_abyss/MerchantInteraction/Interaction.cpp +++ b/Source/the_twilight_abyss/MerchantInteraction/Interaction.cpp @@ -40,8 +40,8 @@ void AInteraction::BeginPlay() //Item Selector refs ItemSelectorWidget = CreateWidget(GetWorld(), ItemSelector); + ItemSelectorWidget->AddToViewport(); ItemSelectorWidget->SetVisibility(ESlateVisibility::Hidden); - //ItemSelectorWidget->AddToViewport(); //We are getting the property of interaction since we need a reference for when we cast in BP and we need the reference to be self Property = ItemSelectorWidget->GetClass()->FindPropertyByName("publicActor"); @@ -102,7 +102,6 @@ void AInteraction::RemoveWidget() UE_LOG(LogTemp, Display, TEXT("You cant open this widget when this widget is open")); } UE_LOG(LogTemp, Display, TEXT("setting isDisabled to true")); - ExitScreen(); if (Property == nullptr) { @@ -121,6 +120,7 @@ void AInteraction::RemoveWidget() else { ItemSelectorWidget->SetVisibility(ESlateVisibility::Visible); + ItemSelectorWidget->SetRenderOpacity(1); bisDisabled = false; } } diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp index 1358d82..a50c2be 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp @@ -42,6 +42,19 @@ void ATempCharacter::BeginPlay() //UGameplayStatics::GetAllActorsWithTag(GetWorld(), Enemy, AIActors); Ammo = TEXT("Ammo"); NoiseEmitter = Cast(this->FindComponentByClass(UPawnNoiseEmitterComponent::StaticClass())); + + //Widget Refs + CrossHairWidget = CreateWidget(GetWorld(), CrossHairSub); + CrossHairWidget->SetVisibility(ESlateVisibility::Visible); + CrossHairWidget->AddToViewport(); + + ImportantStatsWidget = CreateWidget(GetWorld(), ImportantStatsSub); + ImportantStatsWidget->SetVisibility(ESlateVisibility::Visible); + ImportantStatsWidget->AddToViewport(); + + MainMenuWidget = CreateWidget(GetWorld(), MainMenuSub); + MainMenuWidget->SetVisibility(ESlateVisibility::Hidden); + MainMenuWidget->AddToViewport(); } //Binds the input we made in the setup player component to the forward vector diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h index 69995e9..013e8b2 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h @@ -37,9 +37,9 @@ public: UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Inventory, meta = (AllowPrivateAccess = "true")) class UInventoryComponent* Inventory; //Using the InventoryComponent class - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Widgets") - UUserWidget* ItemSelectorWidget; - + //UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Widgets") + //UUserWidget* ItemSelectorWidget; + // Called to bind functionality to input virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override; @@ -100,8 +100,26 @@ public: bool isInStealth = false; + UPROPERTY() + UUserWidget* ImportantStatsWidget; + + UPROPERTY() + UUserWidget* CrossHairWidget; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Widgets") UUserWidget* ImportantStats; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Widgets") UUserWidget* MainMenuWidget; + + UPROPERTY(EditAnywhere, Category= "Widgets") + TSubclassOf ImportantStatsSub; + + UPROPERTY(EditAnywhere, Category= "Widgets") + TSubclassOf MainMenuSub; + + UPROPERTY(EditAnywhere, Category= "Widgets") + TSubclassOf CrossHairSub; + + };