Skip to content

Commit

Permalink
Fix more Popup Button Alignments (#6539)
Browse files Browse the repository at this point in the history
There were 2 popup dialogs that were missing an `Affirmative` flag, which mean the button was not in the right position and thus showed a visual misalignment. This PR fixes that and in tests works as expected.
  • Loading branch information
wookieejedi authored Jan 20, 2025
1 parent bd2094c commit 750c384
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion code/controlconfig/controlsconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,7 @@ bool control_config_accept(bool API_Access)
});

if (it != Control_config_presets.end()) {
popup(flags, 1, POPUP_OK, "You may not overwrite a default preset. Please choose another name.");
popup(flags | PF_USE_AFFIRMATIVE_ICON, 1, POPUP_OK, "You may not overwrite a default preset. Please choose another name.");
goto retry;
}

Expand Down
2 changes: 1 addition & 1 deletion code/controlconfig/presets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ void load_preset_files(SCP_string clone) {

} else if ((it->name != preset.name) || (it->type != Preset_t::pst)) {
if (gameseq_get_state() == GS_STATE_CONTROL_CONFIG) {
popup(PF_TITLE_WHITE, 1, POPUP_OK, "Preset '%s' is a duplicate of an existing preset, ignoring", preset.name.c_str());
popup(PF_TITLE_WHITE | PF_USE_AFFIRMATIVE_ICON, 1, POPUP_OK, "Preset '%s' is a duplicate of an existing preset, ignoring", preset.name.c_str());
} else {
// Complain and ignore if the preset names or the type differs
Warning(LOCATION, "PST => Preset '%s' is a duplicate of an existing preset, ignoring", preset.name.c_str());
Expand Down

0 comments on commit 750c384

Please sign in to comment.