Application: fix connected Vector3d X/Z drag/sliders.

This commit is contained in:
Guillaume Jacquemin 2024-12-06 19:50:40 +01:00
parent 871a750f66
commit 1dd2be6768
Signed by: williamjcm
SSH key fingerprint: SHA256:AYLOg+iTV0ElElnlu4vqM4edFazVdRiuQB0Y5LoKc4A

View file

@ -451,7 +451,7 @@ Application::drawVector3dDrag(Containers::StringView id, Vector3d& vec, float sp
ImGui::DragScalar("##Y", ImGuiDataType_Double, &vec.y(), speed, &min.y(), &max.y(), y_format, flags);
ImGui::PopItemWidth();
ImGui::SameLine(0.0f, ImGui::GetStyle().ItemInnerSpacing.x);
ImGui::DragScalar("##X", ImGuiDataType_Double, &vec.x(), speed, &min.z(), &max.z(), z_format, flags);
ImGui::DragScalar("##Z", ImGuiDataType_Double, &vec.z(), speed, &min.z(), &max.z(), z_format, flags);
ImGui::PopItemWidth();
ImGui::PopID();
}
@ -486,7 +486,7 @@ Application::drawVector3dSlider(Containers::StringView id, Vector3d& vec, Vector
ImGui::SliderScalar("##Y", ImGuiDataType_Double, &vec.y(), &min.y(), &max.y(), y_format, flags);
ImGui::PopItemWidth();
ImGui::SameLine(0.0f, ImGui::GetStyle().ItemInnerSpacing.x);
ImGui::SliderScalar("##X", ImGuiDataType_Double, &vec.x(), &min.z(), &max.z(), z_format, flags);
ImGui::SliderScalar("##Z", ImGuiDataType_Double, &vec.z(), &min.z(), &max.z(), z_format, flags);
ImGui::PopItemWidth();
ImGui::PopID();
}