overlay: minor UI fixes for clear all / reset all (#580)

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

## Description of change
Use `Clear All` when there are no defaults, and `Reset All` when there
are defaults.

Clearing analogs should reset values to 0.5, not 0.
This commit is contained in:
bicarus
2026-03-18 02:51:02 -07:00
committed by GitHub
parent 97d65b137a
commit 97ec2e5d37
2 changed files with 4 additions and 3 deletions
+3 -3
View File
@@ -593,9 +593,11 @@ namespace overlay::windows {
ImGui::AlignTextToFramePadding();
ImGui::TextColored(ImVec4(1.f, 0.7f, 0, 1), "%s Buttons", name.c_str());
std::string reset_button_str = "Reset all";
std::string reset_button_str = "Clear All";
if (name == "Keypad") {
reset_button_str = "Use Preset";
} else if (name == "Overlay") {
reset_button_str = "Reset All";
}
const float clear_w = ImGui::CalcTextSize(reset_button_str.c_str()).x
@@ -2001,7 +2003,6 @@ namespace overlay::windows {
// explicitly not checking for analog.isSet() here
// since it doesn't account for a binding with valid device but invalid index
analog.clearBindings();
analog.setLastState(0.f);
::Config::getInstance().updateBinding(games_list[games_selected], analog);
}
ImGui::CloseCurrentPopup();
@@ -2066,7 +2067,6 @@ namespace overlay::windows {
ImGui::SameLine();
if (ImGui::DeleteButton("Remove")) {
analog.clearBindings();
analog.setLastState(0.f);
::Config::getInstance().updateBinding(
games_list[games_selected], analog);
}