Compare commits

..

No commits in common. "cf41b2e45611dcb62998041b58ee23327fc8a555" and "3bd680ca16098bcc670edba9bcffcdeb81bfa34a" have entirely different histories.

6 changed files with 5 additions and 134 deletions

BIN
Content/UI/Options/OptionsMenu.uasset (Stored with Git LFS)

Binary file not shown.

BIN
Content/UI/Pause/PauseMenu.uasset (Stored with Git LFS)

Binary file not shown.

View File

@ -21,13 +21,7 @@ void UOptionsUIWidget::NativeConstruct()
}
ResolutionButton->OnClicked.AddUniqueDynamic(this, &UOptionsUIWidget::OnResolutionSelectorChanged);
ResolutionButton->OnClicked.AddUniqueDynamic(this, &UOptionsUIWidget::PlayClickedSound);
ResolutionButton->OnHovered.AddUniqueDynamic(this, &UOptionsUIWidget::PlayHoveredSound);
ResolutionButton->OnHovered.AddUniqueDynamic(this, &UOptionsUIWidget::ResolutionTextBlockHoveredDelegate);
ResolutionButton->OnUnhovered.AddUniqueDynamic(this, &UOptionsUIWidget::PlayUnhoveredSound);
ResolutionButton->OnUnhovered.AddUniqueDynamic(this, &UOptionsUIWidget::ResolutionTextBlockUnhoveredDelegate);
}
if (FullscreenCheckBox)
@ -48,13 +42,7 @@ void UOptionsUIWidget::NativeConstruct()
}
RefreshRateButton->OnClicked.AddUniqueDynamic(this, &UOptionsUIWidget::OnRefreshRateSelectorChanged);
RefreshRateButton->OnClicked.AddUniqueDynamic(this, &UOptionsUIWidget::PlayClickedSound);
RefreshRateButton->OnHovered.AddUniqueDynamic(this, &UOptionsUIWidget::PlayHoveredSound);
RefreshRateButton->OnHovered.AddUniqueDynamic(this, &UOptionsUIWidget::RefreshRateTextBlockHoveredDelegate);
RefreshRateButton->OnUnhovered.AddUniqueDynamic(this, &UOptionsUIWidget::PlayUnhoveredSound);
RefreshRateButton->OnUnhovered.AddUniqueDynamic(this, &UOptionsUIWidget::RefreshRateTextBlockUnhoveredDelegate);
}
if (VsyncCheckBox)
@ -79,25 +67,13 @@ void UOptionsUIWidget::NativeConstruct()
if (BackButton)
{
BackButton->OnClicked.AddUniqueDynamic(this, &UOptionsUIWidget::BackButtonOnClicked);
BackButton->OnClicked.AddUniqueDynamic(this, &UOptionsUIWidget::PlayClickedSound);
BackButton->OnHovered.AddUniqueDynamic(this, &UOptionsUIWidget::PlayHoveredSound);
BackButton->OnHovered.AddUniqueDynamic(this, &UOptionsUIWidget::BackTextBlockHoveredDelegate);
BackButton->OnUnhovered.AddUniqueDynamic(this, &UOptionsUIWidget::PlayUnhoveredSound);
BackButton->OnUnhovered.AddUniqueDynamic(this, &UOptionsUIWidget::BackTextBlockUnhoveredDelegate);
}
if (ResetToDefaultsButton)
{
ResetToDefaultsButton->OnClicked.AddUniqueDynamic(this, &UOptionsUIWidget::ResetToDefaultsButtonOnClicked);
BackButton->OnClicked.AddUniqueDynamic(this, &UOptionsUIWidget::PlayClickedSound);
ResetToDefaultsButton->OnHovered.AddUniqueDynamic(this, &UOptionsUIWidget::PlayHoveredSound);
ResetToDefaultsButton->OnHovered.AddUniqueDynamic(this, &UOptionsUIWidget::ResetToDefaultsTextBlockHoveredDelegate);
ResetToDefaultsButton->OnUnhovered.AddUniqueDynamic(this, &UOptionsUIWidget::PlayUnhoveredSound);
ResetToDefaultsButton->OnUnhovered.AddUniqueDynamic(this, &UOptionsUIWidget::ResetToDefaultsTextBlockUnhoveredDelegate);
}
if (APlayerController* PlayerController = UGameplayStatics::GetPlayerController(GetWorld(), 0))

View File

@ -42,16 +42,10 @@ public:
UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
UButton* BackButton;
UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
UTextBlock* BackTextBlock;
UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
UButton* ResetToDefaultsButton;
UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
UTextBlock* ResetToDefaultsTextBlock;
private:
UUserWidget* PreviousScreen;
@ -86,28 +80,4 @@ private:
UFUNCTION()
void OnDynamicResolutionCheckboxChanged(bool bIsChecked);
UFUNCTION()
void ResolutionTextBlockHoveredDelegate() { SetTextBlockHovered(ResolutionTextBlock); }
UFUNCTION()
void ResolutionTextBlockUnhoveredDelegate() { SetTextBlockUnhovered(ResolutionTextBlock); }
UFUNCTION()
void RefreshRateTextBlockHoveredDelegate() { SetTextBlockHovered(RefreshRateTextBlock); }
UFUNCTION()
void RefreshRateTextBlockUnhoveredDelegate() { SetTextBlockUnhovered(RefreshRateTextBlock); }
UFUNCTION()
void BackTextBlockHoveredDelegate() { SetTextBlockHovered(BackTextBlock); }
UFUNCTION()
void BackTextBlockUnhoveredDelegate() { SetTextBlockUnhovered(BackTextBlock); }
UFUNCTION()
void ResetToDefaultsTextBlockHoveredDelegate() { SetTextBlockHovered(ResetToDefaultsTextBlock); }
UFUNCTION()
void ResetToDefaultsTextBlockUnhoveredDelegate() { SetTextBlockUnhovered(ResetToDefaultsTextBlock); }
};

View File

@ -13,62 +13,32 @@ void UPauseUIWidget::NativeConstruct()
if (ResumeButton)
{
ResumeButton->OnClicked.AddUniqueDynamic(this, &UPauseUIWidget::PlayClickedSound);
ResumeButton->OnClicked.AddUniqueDynamic(this, &UPauseUIWidget::ResumeButtonOnClicked);
ResumeButton->OnHovered.AddUniqueDynamic(this, &UPauseUIWidget::PlayHoveredSound);
ResumeButton->OnHovered.AddUniqueDynamic(this, &UPauseUIWidget::ResumeTextBlockHoveredDelegate);
ResumeButton->OnUnhovered.AddUniqueDynamic(this, &UPauseUIWidget::PlayUnhoveredSound);
ResumeButton->OnUnhovered.AddUniqueDynamic(this, &UPauseUIWidget::ResumeTextBlockUnhoveredDelegate);
}
if (OptionsButton)
{
OptionsButton->OnClicked.AddUniqueDynamic(this, &UPauseUIWidget::PlayClickedSound);
OptionsButton->OnClicked.AddUniqueDynamic(this, &UPauseUIWidget::OptionsButtonOnClicked);
OptionsButton->OnHovered.AddUniqueDynamic(this, &UPauseUIWidget::PlayHoveredSound);
OptionsButton->OnHovered.AddUniqueDynamic(this, &UPauseUIWidget::OptionsTextBlockHoveredDelegate);
OptionsButton->OnUnhovered.AddUniqueDynamic(this, &UPauseUIWidget::PlayUnhoveredSound);
OptionsButton->OnUnhovered.AddUniqueDynamic(this, &UPauseUIWidget::OptionsTextBlockUnhoveredDelegate);
}
if (SaveButton)
{
SaveButton->OnClicked.AddUniqueDynamic(this, &UPauseUIWidget::PlayClickedSound);
SaveButton->OnClicked.AddUniqueDynamic(this, &UPauseUIWidget::SaveButtonOnClicked);
SaveButton->OnHovered.AddUniqueDynamic(this, &UPauseUIWidget::PlayHoveredSound);
SaveButton->OnHovered.AddUniqueDynamic(this, &UPauseUIWidget::SaveTextBlockHoveredDelegate);
SaveButton->OnUnhovered.AddUniqueDynamic(this, &UPauseUIWidget::PlayUnhoveredSound);
SaveButton->OnUnhovered.AddUniqueDynamic(this, &UPauseUIWidget::SaveTextBlockUnhoveredDelegate);
}
if (QuitButton)
{
QuitButton->OnClicked.AddUniqueDynamic(this, &UPauseUIWidget::PlayClickedSound);
QuitButton->OnClicked.AddUniqueDynamic(this, &UPauseUIWidget::QuitButtonOnClicked);
QuitButton->OnHovered.AddUniqueDynamic(this, &UPauseUIWidget::PlayHoveredSound);
QuitButton->OnHovered.AddUniqueDynamic(this, &UPauseUIWidget::QuitTextBlockHoveredDelegate);
QuitButton->OnUnhovered.AddUniqueDynamic(this, &UPauseUIWidget::PlayUnhoveredSound);
QuitButton->OnUnhovered.AddUniqueDynamic(this, &UPauseUIWidget::QuitTextBlockUnhoveredDelegate);
}
if (ExitGameButton)
{
ExitGameButton->OnClicked.AddUniqueDynamic(this, &UPauseUIWidget::PlayClickedSound);
ExitGameButton->OnClicked.AddUniqueDynamic(this, &UPauseUIWidget::ExitGameButtonOnClicked);
ExitGameButton->OnHovered.AddUniqueDynamic(this, &UPauseUIWidget::PlayHoveredSound);
ExitGameButton->OnHovered.AddUniqueDynamic(this, &UPauseUIWidget::ExitGameTextBlockHoveredDelegate);
ExitGameButton->OnUnhovered.AddUniqueDynamic(this, &UPauseUIWidget::PlayUnhoveredSound);
ExitGameButton->OnUnhovered.AddUniqueDynamic(this, &UPauseUIWidget::ExitGameTextBlockUnhoveredDelegate);
}
if (APlayerController* PlayerController = UGameplayStatics::GetPlayerController(GetWorld(), 0))

View File

@ -21,33 +21,18 @@ public:
UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
UButton* ResumeButton;
UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
UTextBlock* ResumeTextBlock;
UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
UButton* OptionsButton;
UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
UTextBlock* OptionsTextBlock;
UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
UButton* SaveButton;
UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
UTextBlock* SaveTextBlock;
UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
UButton* QuitButton;
UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
UTextBlock* QuitTextBlock;
UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
UButton* ExitGameButton;
UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
UTextBlock* ExitGameTextBlock;
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite)
TSubclassOf<class UUserWidget> OptionsMenuWidget;
@ -72,34 +57,4 @@ private:
UFUNCTION()
void ExitGameButtonOnClicked();
UFUNCTION()
void ResumeTextBlockHoveredDelegate() { SetTextBlockHovered(ResumeTextBlock); }
UFUNCTION()
void ResumeTextBlockUnhoveredDelegate() { SetTextBlockUnhovered(ResumeTextBlock); }
UFUNCTION()
void OptionsTextBlockHoveredDelegate() { SetTextBlockHovered(OptionsTextBlock); }
UFUNCTION()
void OptionsTextBlockUnhoveredDelegate() { SetTextBlockUnhovered(OptionsTextBlock); }
UFUNCTION()
void SaveTextBlockHoveredDelegate() { SetTextBlockHovered(SaveTextBlock); }
UFUNCTION()
void SaveTextBlockUnhoveredDelegate() { SetTextBlockUnhovered(SaveTextBlock); }
UFUNCTION()
void QuitTextBlockHoveredDelegate() { SetTextBlockHovered(QuitTextBlock); }
UFUNCTION()
void QuitTextBlockUnhoveredDelegate() { SetTextBlockUnhovered(QuitTextBlock); }
UFUNCTION()
void ExitGameTextBlockHoveredDelegate() { SetTextBlockHovered(ExitGameTextBlock); }
UFUNCTION()
void ExitGameTextBlockUnhoveredDelegate() { SetTextBlockUnhovered(ExitGameTextBlock); }
};