Centering around the mouse pointer.

This commit is contained in:
Tomaž Vöröš
2023-01-27 20:00:05 +01:00
parent dbefb70db3
commit bca8f28f43
3 changed files with 97 additions and 5 deletions

View File

@@ -327,8 +327,6 @@ void View::DrawTimeline()
if( m_yDelta != 0 )
{
auto& io = ImGui::GetIO();
auto y = ImGui::GetScrollY();
ImGui::SetScrollY( y - m_yDelta );
io.MouseClickedPos[1].y = io.MousePos.y;
}
@@ -380,7 +378,7 @@ void View::DrawTimeline()
}
}
m_tc.End( pxns, wpos, hover, yMin, yMax );
m_tc.End( pxns, wpos, hover, drawMouseLine && m_viewMode == ViewMode::Paused, yMin, yMax );
ImGui::EndChild();
m_lockHighlight = m_nextLockHighlight;