修复双击垂直音量滑动条时所有音量都会被重置的问题
This commit is contained in:
parent
14b571e6d0
commit
57151f25d2
@ -258,11 +258,10 @@ bool vertical_volume_slider(const char* id, ImVec2 size, float* volume, float mi
|
|||||||
ImGui::BeginTooltip();
|
ImGui::BeginTooltip();
|
||||||
ImGui::Text("Volume: %.3fdb", 20.0f * log10f(*volume));
|
ImGui::Text("Volume: %.3fdb", 20.0f * log10f(*volume));
|
||||||
ImGui::EndTooltip();
|
ImGui::EndTooltip();
|
||||||
}
|
if (ImGui::IsMouseDoubleClicked(ImGuiMouseButton_Left)) {
|
||||||
|
*volume = 1.0f;
|
||||||
if (ImGui::IsMouseDoubleClicked(ImGuiMouseButton_Left)) {
|
return true;
|
||||||
*volume = 1.0f;
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static float drag_start_value = 0.0f;
|
static float drag_start_value = 0.0f;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user