From bad9a639d9f410b61ec575917541b5248b42b64e Mon Sep 17 00:00:00 2001 From: baz Date: Thu, 4 Apr 2024 23:16:18 +0100 Subject: [PATCH] Disable resolution button when fullscreen is ticked --- Source/Nakatomi/OptionsUIWidget.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Nakatomi/OptionsUIWidget.cpp b/Source/Nakatomi/OptionsUIWidget.cpp index ba99401..7f3b3d2 100644 --- a/Source/Nakatomi/OptionsUIWidget.cpp +++ b/Source/Nakatomi/OptionsUIWidget.cpp @@ -91,7 +91,7 @@ void UOptionsUIWidget::NativeConstruct() if (ResetToDefaultsButton) { ResetToDefaultsButton->OnClicked.AddUniqueDynamic(this, &UOptionsUIWidget::ResetToDefaultsButtonOnClicked); - BackButton->OnClicked.AddUniqueDynamic(this, &UOptionsUIWidget::PlayClickedSound); + ResetToDefaultsButton->OnClicked.AddUniqueDynamic(this, &UOptionsUIWidget::PlayClickedSound); ResetToDefaultsButton->OnHovered.AddUniqueDynamic(this, &UOptionsUIWidget::PlayHoveredSound); ResetToDefaultsButton->OnHovered.AddUniqueDynamic(this, &UOptionsUIWidget::ResetToDefaultsTextBlockHoveredDelegate); @@ -177,10 +177,12 @@ void UOptionsUIWidget::OnFullscreenCheckboxChanged(bool bIsChecked) if (bIsChecked) { GEngine->GameUserSettings->SetFullscreenMode(EWindowMode::Fullscreen); + ResolutionButton->SetIsEnabled(false); } else { GEngine->GameUserSettings->SetFullscreenMode(EWindowMode::Windowed); + ResolutionButton->SetIsEnabled(true); } GEngine->GameUserSettings->ApplySettings(true);