mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-02 06:40:42 -07:00
overlay: show name of analog control in popup title (#667)
This commit is contained in:
@@ -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.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user