New GRID in views to perrorm MousePointer snap to GRID

For this new MousePointer to snap to grid, a Grid specific for each view is necessary. Grid for moving is orthographic (with an aspect ratio), and grid for mixing or rotation is in polar coordinates. Rendering is done with new Primitives. The entire calculation of grab coordinates is changed to be able to snap to grid coordinates in all circumstances.
This commit is contained in:
Bruno Herbelin
2023-08-27 12:15:31 +02:00
parent d0e1101bfb
commit 7fcb53c7d0
29 changed files with 1517 additions and 579 deletions

View File

@@ -810,7 +810,7 @@ void ImGuiVisitor::visit (SessionFileSource& s)
std::ostringstream oss;
int f = 100 - int(s.session()->fading() * 100.f);
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
if (ImGui::SliderInt("##Fading", &f, 0, 100, f > 99 ? "None" : "%d %%") )
if (ImGui::SliderInt("##Fading", &f, 0, 100, f > 99 ? ICON_FA_ADJUST " None" : ICON_FA_ADJUST " %d %%") )
s.session()->setFadingTarget( float(100 - f) * 0.01f );
if (ImGui::IsItemDeactivatedAfterEdit()){
oss << s.name() << ": Fading " << f << " %";