Updated TempCharacter to fix merchant exit bug and cached escapemenu
This commit is contained in:
		
							parent
							
								
									b446ba7691
								
							
						
					
					
						commit
						7c7fb0db01
					
				| @ -50,13 +50,13 @@ void ATempCharacter::BeginPlay() | ||||
| 	CrossHairWidget->SetVisibility(ESlateVisibility::Visible); | ||||
| 	CrossHairWidget->AddToViewport(); | ||||
| 
 | ||||
| 	// ImportantStatsWidget = CreateWidget<UUserWidget>(GetWorld(), ImportantStatsSub);
 | ||||
| 	// ImportantStatsWidget->SetVisibility(ESlateVisibility::Visible);
 | ||||
| 	// ImportantStatsWidget->AddToViewport();
 | ||||
| 
 | ||||
| 	InventoryWidget = CreateWidget<UUserWidget>(GetWorld(), InventoryMenuSub); | ||||
| 	InventoryWidget->SetVisibility(ESlateVisibility::Hidden); | ||||
| 	InventoryWidget->AddToViewport(); | ||||
| 
 | ||||
| 	EscapeMenuWidget = CreateWidget<UUserWidget>(GetWorld(), EscapeMenuSub); | ||||
| 	EscapeMenuWidget->SetVisibility(ESlateVisibility::Hidden); | ||||
| 	EscapeMenuWidget->AddToViewport(); | ||||
| } | ||||
| 
 | ||||
| //Binds the input we made in the setup player component to the forward vector
 | ||||
| @ -278,6 +278,8 @@ void ATempCharacter::InputEnabler() | ||||
| 	APlayerController* PlayerController = GetWorld()->GetFirstPlayerController(); | ||||
| 	PlayerController->SetInputMode(FInputModeGameOnly()); | ||||
| 	PlayerController->bShowMouseCursor = false; | ||||
| 	PlayerController->SetIgnoreMoveInput(false); | ||||
| 	PlayerController->SetIgnoreLookInput(false); | ||||
| 
 | ||||
| 	UE_LOG(LogTemp, Display, TEXT("Enabling Inputs")); | ||||
| 	disableTab = true; | ||||
|  | ||||
| @ -121,12 +121,18 @@ public: | ||||
| 	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Widgets") | ||||
| 	UUserWidget* InventoryWidget; | ||||
| 
 | ||||
| 	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Widgets") | ||||
| 	UUserWidget* EscapeMenuWidget; | ||||
| 	 | ||||
| 	UPROPERTY(EditAnywhere, Category= "Widgets") | ||||
| 	TSubclassOf<UUserWidget> ImportantStatsSub; | ||||
| 
 | ||||
| 	UPROPERTY(EditAnywhere, Category= "Widgets") | ||||
| 	TSubclassOf<UUserWidget> InventoryMenuSub; | ||||
| 
 | ||||
| 	UPROPERTY(EditAnywhere, Category= "Widgets") | ||||
| 	TSubclassOf<UUserWidget> EscapeMenuSub; | ||||
| 
 | ||||
| 	UPROPERTY(EditAnywhere, Category= "Widgets") | ||||
| 	TSubclassOf<UUserWidget> CrossHairSub; | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user