Disable resolution button when fullscreen is ticked

This commit is contained in:
baz 2024-04-04 23:16:18 +01:00
parent cf41b2e456
commit bad9a639d9
1 changed files with 3 additions and 1 deletions

View File

@ -91,7 +91,7 @@ void UOptionsUIWidget::NativeConstruct()
if (ResetToDefaultsButton) if (ResetToDefaultsButton)
{ {
ResetToDefaultsButton->OnClicked.AddUniqueDynamic(this, &UOptionsUIWidget::ResetToDefaultsButtonOnClicked); 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::PlayHoveredSound);
ResetToDefaultsButton->OnHovered.AddUniqueDynamic(this, &UOptionsUIWidget::ResetToDefaultsTextBlockHoveredDelegate); ResetToDefaultsButton->OnHovered.AddUniqueDynamic(this, &UOptionsUIWidget::ResetToDefaultsTextBlockHoveredDelegate);
@ -177,10 +177,12 @@ void UOptionsUIWidget::OnFullscreenCheckboxChanged(bool bIsChecked)
if (bIsChecked) if (bIsChecked)
{ {
GEngine->GameUserSettings->SetFullscreenMode(EWindowMode::Fullscreen); GEngine->GameUserSettings->SetFullscreenMode(EWindowMode::Fullscreen);
ResolutionButton->SetIsEnabled(false);
} }
else else
{ {
GEngine->GameUserSettings->SetFullscreenMode(EWindowMode::Windowed); GEngine->GameUserSettings->SetFullscreenMode(EWindowMode::Windowed);
ResolutionButton->SetIsEnabled(true);
} }
GEngine->GameUserSettings->ApplySettings(true); GEngine->GameUserSettings->ApplySettings(true);