overlay: prevent save button shifting patches text (#709)

## Link to GitHub Issue or related Pull Request, if one exists
#0

## Description of change
When opening the patches tab by pressing F4 in game, the Save button
doesn't appear until after initially selecting/deselecting a patch, then
it shifts all of the patch text below. To solve this annoyance, this
keeps the Save button in a fixed position (starts greyed out until a
selection) and no longer shifts the text.

## Testing
Confirmed saving selected patches still works properly in the overlay
and standalone cfg
This commit is contained in:
drmext
2026-05-29 06:58:09 +00:00
committed by GitHub
parent 489d40d87d
commit a977cba772
@@ -365,21 +365,24 @@ namespace overlay::windows {
config_dirty = true;
}
// check for dirty state
if (config_dirty) {
// handle dirty state
if (cfg::CONFIGURATOR_STANDALONE) {
// auto save for configurator version
if (config_dirty) {
this->config_save();
}
} else {
// manual save for live version
// manual save for live version: always render the row so the rest
// of the panel doesn't shift when config_dirty flips. Disable the
// button when there is nothing to save.
ImGui::AlignTextToFramePadding();
ImGui::HelpMarker("Save current patch state to the configuration file.");
ImGui::SameLine();
ImGui::BeginDisabled(!config_dirty);
if (ImGui::Button("Save")) {
this->config_save();
}
}
ImGui::EndDisabled();
}
bool disable_all_patches = false;