mirror of
https://github.com/wolfpld/tracy
synced 2025-04-30 12:53:51 +00:00
Hide frame related information if no frame instrumentation.
This commit is contained in:
parent
23ebce2862
commit
5200ea2c84
@ -836,6 +836,8 @@ bool View::DrawImpl()
|
|||||||
ImGui::EndPopup();
|
ImGui::EndPopup();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if( m_worker.AreFramesUsed() )
|
||||||
|
{
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if( ImGui::SmallButton( " " ICON_FA_CARET_LEFT " " ) ) ZoomToPrevFrame();
|
if( ImGui::SmallButton( " " ICON_FA_CARET_LEFT " " ) ) ZoomToPrevFrame();
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
@ -886,6 +888,7 @@ bool View::DrawImpl()
|
|||||||
if( clicked ) ZoomToRange( m_worker.GetFrameBegin( *m_frames, frameNum - frameOffset ), m_worker.GetFrameEnd( *m_frames, frameNum - frameOffset ) );
|
if( clicked ) ZoomToRange( m_worker.GetFrameBegin( *m_frames, frameNum - frameOffset ), m_worker.GetFrameEnd( *m_frames, frameNum - frameOffset ) );
|
||||||
ImGui::EndPopup();
|
ImGui::EndPopup();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
@ -696,6 +696,8 @@ void View::DrawOptions()
|
|||||||
ImGui::TreePop();
|
ImGui::TreePop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( m_worker.AreFramesUsed() )
|
||||||
|
{
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
expand = ImGui::TreeNode( ICON_FA_IMAGES " Visible frame sets:" );
|
expand = ImGui::TreeNode( ICON_FA_IMAGES " Visible frame sets:" );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
@ -730,6 +732,7 @@ void View::DrawOptions()
|
|||||||
}
|
}
|
||||||
ImGui::TreePop();
|
ImGui::TreePop();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -296,6 +296,8 @@ void View::DrawTimeline()
|
|||||||
|
|
||||||
m_tc.Begin();
|
m_tc.Begin();
|
||||||
DrawTimelineFramesHeader();
|
DrawTimelineFramesHeader();
|
||||||
|
if( m_worker.AreFramesUsed() )
|
||||||
|
{
|
||||||
auto& frames = m_worker.GetFrames();
|
auto& frames = m_worker.GetFrames();
|
||||||
for( auto fd : frames )
|
for( auto fd : frames )
|
||||||
{
|
{
|
||||||
@ -304,6 +306,7 @@ void View::DrawTimeline()
|
|||||||
DrawTimelineFrames( *fd );
|
DrawTimelineFrames( *fd );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const auto yMin = ImGui::GetCursorScreenPos().y;
|
const auto yMin = ImGui::GetCursorScreenPos().y;
|
||||||
const auto yMax = linepos.y + lineh;
|
const auto yMax = linepos.y + lineh;
|
||||||
|
@ -183,7 +183,7 @@ void View::DrawInfo()
|
|||||||
ImGui::TreePop();
|
ImGui::TreePop();
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ImGui::TreeNode( "Frame statistics" ) )
|
if( m_worker.AreFramesUsed() && ImGui::TreeNode( "Frame statistics" ) )
|
||||||
{
|
{
|
||||||
auto fsz = m_worker.GetFullFrameCount( *m_frames );
|
auto fsz = m_worker.GetFullFrameCount( *m_frames );
|
||||||
if( fsz != 0 )
|
if( fsz != 0 )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user