Skip to content

Commit

Permalink
🤏 [Camera] Use logarithmic drag for zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
JulesFouchy committed Mar 30, 2024
1 parent 37e03ac commit 9062374
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Cool/StrongTypes/Camera2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ auto imgui_widget(std::string_view name, Camera2D& cam, int number_of_snaps, flo

b |= ImGui::DragFloat2("Translation", glm::value_ptr(cam.translation), 0.01f);
b |= imgui_widget("Rotation", cam.rotation, number_of_snaps, snaps_offset, always_snap);
b |= ImGui::DragFloat("Zoom", &cam.zoom, 0.01f, 0.001f, FLT_MAX / static_cast<float>(INT_MAX));
b |= ImGui::DragFloat("Zoom", &cam.zoom, 0.01f, 0.001f, FLT_MAX, "%.3f", ImGuiSliderFlags_Logarithmic);
if (ImGui::Button(icon_fmt("Reset Camera", ICOMOON_TARGET).c_str()))
{
cam = {};
Expand Down

0 comments on commit 9062374

Please sign in to comment.