Show preview of lock source locations in options window.

This commit is contained in:
Bartosz Taudul 2021-03-27 13:32:38 +01:00
parent 8f0c5e867e
commit e2be45c0ba
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -8713,15 +8713,19 @@ void View::DrawOptions()
ImGui::SameLine();
}
ImGui::TextDisabled( "(%s) %s:%i", RealToString( l.second->timeline.size() ), fileName, sl.line );
if( ImGui::IsItemClicked( 1 ) )
if( ImGui::IsItemHovered() )
{
if( SourceFileValid( fileName, m_worker.GetCaptureTime(), *this, m_worker ) )
DrawSourceTooltip( fileName, sl.line, 1, 1 );
if( ImGui::IsItemClicked( 1 ) )
{
ViewSource( fileName, sl.line );
}
else
{
m_optionsLockBuzzAnim.Enable( l.second->srcloc, 0.5f );
if( SourceFileValid( fileName, m_worker.GetCaptureTime(), *this, m_worker ) )
{
ViewSource( fileName, sl.line );
}
else
{
m_optionsLockBuzzAnim.Enable( l.second->srcloc, 0.5f );
}
}
}
}
@ -8787,15 +8791,19 @@ void View::DrawOptions()
ImGui::SameLine();
}
ImGui::TextDisabled( "(%s) %s:%i", RealToString( l.second->timeline.size() ), fileName, sl.line );
if( ImGui::IsItemClicked( 1 ) )
if( ImGui::IsItemHovered() )
{
if( SourceFileValid( fileName, m_worker.GetCaptureTime(), *this, m_worker ) )
DrawSourceTooltip( fileName, sl.line, 1, 1 );
if( ImGui::IsItemClicked( 1 ) )
{
ViewSource( fileName, sl.line );
}
else
{
m_optionsLockBuzzAnim.Enable( l.second->srcloc, 0.5f );
if( SourceFileValid( fileName, m_worker.GetCaptureTime(), *this, m_worker ) )
{
ViewSource( fileName, sl.line );
}
else
{
m_optionsLockBuzzAnim.Enable( l.second->srcloc, 0.5f );
}
}
}
}
@ -8861,15 +8869,19 @@ void View::DrawOptions()
ImGui::SameLine();
}
ImGui::TextDisabled( "(%s) %s:%i", RealToString( l.second->timeline.size() ), fileName, sl.line );
if( ImGui::IsItemClicked( 1 ) )
if( ImGui::IsItemHovered() )
{
if( SourceFileValid( fileName, m_worker.GetCaptureTime(), *this, m_worker ) )
DrawSourceTooltip( fileName, sl.line, 1, 1 );
if( ImGui::IsItemClicked( 1 ) )
{
ViewSource( fileName, sl.line );
}
else
{
m_optionsLockBuzzAnim.Enable( l.second->srcloc, 0.5f );
if( SourceFileValid( fileName, m_worker.GetCaptureTime(), *this, m_worker ) )
{
ViewSource( fileName, sl.line );
}
else
{
m_optionsLockBuzzAnim.Enable( l.second->srcloc, 0.5f );
}
}
}
}