overlay: show name of analog control in popup title (#667)

This commit is contained in:
bicarus
2026-05-02 00:01:33 -07:00
committed by GitHub
parent af8d8dae9f
commit 7b862768b0
2 changed files with 9 additions and 7 deletions
+8 -6
View File
@@ -2253,8 +2253,9 @@ namespace overlay::windows {
}
// analog binding
const std::string title = "Analog Binding (" + analog.getName() + ")";
if (ImGui::Button("Set")) {
ImGui::OpenPopup("Analog Binding");
ImGui::OpenPopup(title.c_str());
// get devices
this->analogs_devices.clear();
@@ -2284,7 +2285,7 @@ namespace overlay::windows {
}
}
edit_analog_popup(analog);
edit_analog_popup(analog, title);
// row hover detection (invisible selectable that spans entire row)
ImGui::InvisibleTableRowSelectable();
@@ -2298,8 +2299,8 @@ namespace overlay::windows {
}
}
void Config::edit_analog_popup(Analog &analog) {
if (ImGui::BeginPopupModal("Analog Binding", NULL, ImGuiWindowFlags_AlwaysAutoResize)) {
void Config::edit_analog_popup(Analog &analog, std::string title) {
if (ImGui::BeginPopupModal(title.c_str(), NULL, ImGuiWindowFlags_AlwaysAutoResize)) {
// device selector
auto analog_device_changed = ImGui::Combo(
@@ -2596,7 +2597,7 @@ namespace overlay::windows {
// delay buffer
int delay = analog.getDelayBufferDepth();
if (ImGui::InputInt("Delay", &delay, 1, 10)) {
if (ImGui::InputInt("Delay (experimental)", &delay, 1, 10)) {
delay = CLAMP(delay, 0, 256);
analog.setDelayBufferDepth(delay);
}
@@ -2605,7 +2606,8 @@ namespace overlay::windows {
"Adds a delay to input. This is poll-based, not time-based.\n\n"
"WARNING: delay depends on how often the game polls for input! "
"Strongly recommended that you go into the game's test menu instead "
"of adjusting in spicecfg.");
"of adjusting in spicecfg. Close all overlays as that will affect "
"how input delay is calculated.");
}
}