Compare commits
	
		
			No commits in common. "96c520a7938d34838f7d05b8f7b35dfbd45822a3" and "7056f530f738dc68f81e79a018607759d2b7d574" have entirely different histories.
		
	
	
		
			96c520a793
			...
			7056f530f7
		
	
		
							
								
								
									
										
											BIN
										
									
								
								Content/Audio/SW_GunFire.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Content/Audio/SW_GunFire.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Content/Audio/SW_Shotgun.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Content/Audio/SW_Shotgun.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Content/Audio/SW_Switch.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Content/Audio/SW_Switch.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Content/Audio/gun_fire.uasset
									 (Stored with Git LFS)
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Content/Audio/gun_fire.uasset
									 (Stored with Git LFS)
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Content/Audio/shotgun.uasset
									 (Stored with Git LFS)
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Content/Audio/shotgun.uasset
									 (Stored with Git LFS)
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Content/Levels/MainMenu/MainMenu.umap
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Content/Levels/MainMenu/MainMenu.umap
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Content/UI/MainMenu/MainMenuUIWidget.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Content/UI/MainMenu/MainMenuUIWidget.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							| @ -13,25 +13,21 @@ void UMainMenuUIWidget::NativeConstruct() | |||||||
| 	if (NewGameButton) | 	if (NewGameButton) | ||||||
| 	{ | 	{ | ||||||
| 		NewGameButton->OnClicked.AddUniqueDynamic(this, &UMainMenuUIWidget::NewGameButtonOnClicked); | 		NewGameButton->OnClicked.AddUniqueDynamic(this, &UMainMenuUIWidget::NewGameButtonOnClicked); | ||||||
| 		NewGameButton->OnHovered.AddUniqueDynamic(this, &UMainMenuUIWidget::PlayHoveredSound); |  | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	if (LoadGameButton) | 	if (LoadGameButton) | ||||||
| 	{ | 	{ | ||||||
| 		LoadGameButton->OnClicked.AddUniqueDynamic(this, &UMainMenuUIWidget::LoadGameButtonOnClicked); | 		LoadGameButton->OnClicked.AddUniqueDynamic(this, &UMainMenuUIWidget::LoadGameButtonOnClicked); | ||||||
| 		LoadGameButton->OnHovered.AddUniqueDynamic(this, &UMainMenuUIWidget::PlayHoveredSound); |  | ||||||
| 	} | 	} | ||||||
| 	 | 	 | ||||||
| 	if (OptionsButton) | 	if (OptionsButton) | ||||||
| 	{ | 	{ | ||||||
| 		OptionsButton->OnClicked.AddUniqueDynamic(this, &UMainMenuUIWidget::OptionsButtonOnClicked); | 		OptionsButton->OnClicked.AddUniqueDynamic(this, &UMainMenuUIWidget::OptionsButtonOnClicked); | ||||||
| 		OptionsButton->OnHovered.AddUniqueDynamic(this, &UMainMenuUIWidget::PlayHoveredSound); |  | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	if (QuitButton) | 	if (QuitButton) | ||||||
| 	{ | 	{ | ||||||
| 		QuitButton->OnClicked.AddUniqueDynamic(this, &UMainMenuUIWidget::QuitButtonOnClicked); | 		QuitButton->OnClicked.AddUniqueDynamic(this, &UMainMenuUIWidget::QuitButtonOnClicked); | ||||||
| 		QuitButton->OnHovered.AddUniqueDynamic(this, &UMainMenuUIWidget::PlayHoveredSound); |  | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	if (APlayerController* PlayerController = UGameplayStatics::GetPlayerController(GetWorld(), 0)) | 	if (APlayerController* PlayerController = UGameplayStatics::GetPlayerController(GetWorld(), 0)) | ||||||
| @ -39,6 +35,8 @@ void UMainMenuUIWidget::NativeConstruct() | |||||||
| 		UWidgetBlueprintLibrary::SetInputMode_UIOnlyEx(PlayerController, this, EMouseLockMode::LockAlways); | 		UWidgetBlueprintLibrary::SetInputMode_UIOnlyEx(PlayerController, this, EMouseLockMode::LockAlways); | ||||||
| 		PlayerController->bShowMouseCursor = true; | 		PlayerController->bShowMouseCursor = true; | ||||||
| 	} | 	} | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void UMainMenuUIWidget::NewGameButtonOnClicked() | void UMainMenuUIWidget::NewGameButtonOnClicked() | ||||||
| @ -83,11 +81,3 @@ void UMainMenuUIWidget::QuitButtonOnClicked() | |||||||
| 	// For some reason the generic version does not work the same as FWindowsPlatformMisc
 | 	// For some reason the generic version does not work the same as FWindowsPlatformMisc
 | ||||||
| 	FWindowsPlatformMisc::RequestExit(false); | 	FWindowsPlatformMisc::RequestExit(false); | ||||||
| } | } | ||||||
| 
 |  | ||||||
| void UMainMenuUIWidget::PlayHoveredSound() |  | ||||||
| { |  | ||||||
| 	if (ButtonHoveredSound) |  | ||||||
| 	{ |  | ||||||
| 		UGameplayStatics::PlaySound2D(GetWorld(), ButtonHoveredSound); |  | ||||||
| 	} |  | ||||||
| } |  | ||||||
|  | |||||||
| @ -41,9 +41,6 @@ public: | |||||||
| 	UPROPERTY(EditDefaultsOnly, BlueprintReadWrite) | 	UPROPERTY(EditDefaultsOnly, BlueprintReadWrite) | ||||||
| 	TSoftObjectPtr<UWorld> NewGameLevel; | 	TSoftObjectPtr<UWorld> NewGameLevel; | ||||||
| 
 | 
 | ||||||
| 	UPROPERTY(EditDefaultsOnly, BlueprintReadWrite) |  | ||||||
| 	USoundBase* ButtonHoveredSound; |  | ||||||
| 
 |  | ||||||
| private: | private: | ||||||
| 	UUserWidget* currentNewGameWidget; | 	UUserWidget* currentNewGameWidget; | ||||||
| 
 | 
 | ||||||
| @ -66,7 +63,4 @@ private: | |||||||
| 
 | 
 | ||||||
| 	UFUNCTION() | 	UFUNCTION() | ||||||
| 	void QuitButtonOnClicked(); | 	void QuitButtonOnClicked(); | ||||||
| 
 |  | ||||||
| 	UFUNCTION() |  | ||||||
| 	void PlayHoveredSound(); |  | ||||||
| }; | }; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user