修复双击垂直音量滑动条时所有音量都会被重置的问题

This commit is contained in:
Nanako 2024-07-17 20:28:21 +08:00
parent 14b571e6d0
commit 57151f25d2

View File

@ -258,12 +258,11 @@ bool vertical_volume_slider(const char* id, ImVec2 size, float* volume, float mi
ImGui::BeginTooltip();
ImGui::Text("Volume: %.3fdb", 20.0f * log10f(*volume));
ImGui::EndTooltip();
}
if (ImGui::IsMouseDoubleClicked(ImGuiMouseButton_Left)) {
*volume = 1.0f;
return true;
}
}
static float drag_start_value = 0.0f;
static ImGuiID dragging = 0;