diff --git a/Source/the_twilight_abyss/MerchantInteraction/Interaction.cpp b/Source/the_twilight_abyss/MerchantInteraction/Interaction.cpp index 5cb2b8a..27c894f 100644 --- a/Source/the_twilight_abyss/MerchantInteraction/Interaction.cpp +++ b/Source/the_twilight_abyss/MerchantInteraction/Interaction.cpp @@ -59,5 +59,6 @@ void AInteraction::RemoveWidget() else { ItemSelectorWidget->AddToViewport(0); + bisDisabled = false; } } \ No newline at end of file diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp index 7c09f12..9a8920b 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp @@ -124,8 +124,21 @@ void ATempCharacter::LineTraceLogic() void ATempCharacter::InputDisabler() { UE_LOG(LogTemp, Display, TEXT("Disabling playermovement")); - GetWorld()->GetFirstPlayerController()->SetIgnoreLookInput(false); + GetWorld()->GetFirstPlayerController()->SetIgnoreLookInput(true); GetWorld()->GetFirstPlayerController()->SetIgnoreMoveInput(true); + GetWorld()->GetFirstPlayerController()->bShowMouseCursor = true; + GetWorld()->GetFirstPlayerController()->bEnableClickEvents = true; + GetWorld()->GetFirstPlayerController()->bEnableMouseOverEvents = true; +} + +void ATempCharacter::InputEnabler() +{ + UE_LOG(LogTemp, Display, TEXT("Enabling Inputs")); + GetWorld()->GetFirstPlayerController()->SetIgnoreLookInput(false); + GetWorld()->GetFirstPlayerController()->SetIgnoreMoveInput(false); + GetWorld()->GetFirstPlayerController()->bShowMouseCursor = false; + GetWorld()->GetFirstPlayerController()->bEnableClickEvents = false; + GetWorld()->GetFirstPlayerController()->bEnableMouseOverEvents = false; } void ATempCharacter::UseItem(class UBaseItem* Item) @@ -137,3 +150,5 @@ void ATempCharacter::UseItem(class UBaseItem* Item) } } + + diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h index 5b607c2..cc97668 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h @@ -53,5 +53,8 @@ public: //Using the item in the inventory UFUNCTION(BlueprintCallable, Category= "Items") void UseItem(class UBaseItem* Item); // Overriding the BaseItem Class + + UFUNCTION(BlueprintCallable) + void InputEnabler(); };