Push timline context to Draw and DrawContents functions.

This commit is contained in:
Bartosz Taudul
2023-03-14 02:24:23 +01:00
parent b6b6e1edcf
commit c81ef177ab
11 changed files with 21 additions and 20 deletions

View File

@@ -252,9 +252,9 @@ void TimelineItemThread::HeaderExtraContents( int offset, const ImVec2& wpos, fl
#endif
}
bool TimelineItemThread::DrawContents( double pxns, int& offset, const ImVec2& wpos, bool hover, float yMin, float yMax )
bool TimelineItemThread::DrawContents( const TimelineContext& ctx, int& offset, bool hover, float yMin, float yMax )
{
const auto res = m_view.DrawThread( *m_thread, pxns, offset, wpos, hover, yMin, yMax, m_ghost );
const auto res = m_view.DrawThread( *m_thread, ctx.pxns, offset, ctx.wpos, hover, yMin, yMax, m_ghost );
if( !res )
{
auto& crash = m_worker.GetCrashEvent();