mirror of
https://github.com/wolfpld/tracy
synced 2025-05-01 13:13:53 +00:00
Notify TimelineItem when drawing has finished.
This commit is contained in:
parent
3a2cc0bed0
commit
b4893fafb7
@ -48,6 +48,7 @@ void TimelineItem::Draw( bool firstFrame, const TimelineContext& ctx, int yOffse
|
|||||||
{
|
{
|
||||||
if( !DrawContents( ctx, yEnd ) && !m_view.GetViewData().drawEmptyLabels )
|
if( !DrawContents( ctx, yEnd ) && !m_view.GetViewData().drawEmptyLabels )
|
||||||
{
|
{
|
||||||
|
DrawFinished();
|
||||||
yEnd = yBegin;
|
yEnd = yBegin;
|
||||||
AdjustThreadHeight( firstFrame, yBegin, yEnd );
|
AdjustThreadHeight( firstFrame, yBegin, yEnd );
|
||||||
ImGui::PopClipRect();
|
ImGui::PopClipRect();
|
||||||
@ -57,6 +58,7 @@ void TimelineItem::Draw( bool firstFrame, const TimelineContext& ctx, int yOffse
|
|||||||
}
|
}
|
||||||
|
|
||||||
DrawOverlay( wpos + ImVec2( 0, yBegin ), wpos + ImVec2( w, yEnd ) );
|
DrawOverlay( wpos + ImVec2( 0, yBegin ), wpos + ImVec2( w, yEnd ) );
|
||||||
|
DrawFinished();
|
||||||
ImGui::PopClipRect();
|
ImGui::PopClipRect();
|
||||||
|
|
||||||
float labelWidth;
|
float labelWidth;
|
||||||
|
@ -50,6 +50,7 @@ protected:
|
|||||||
|
|
||||||
virtual bool DrawContents( const TimelineContext& ctx, int& offset ) = 0;
|
virtual bool DrawContents( const TimelineContext& ctx, int& offset ) = 0;
|
||||||
virtual void DrawOverlay( const ImVec2& ul, const ImVec2& dr ) {}
|
virtual void DrawOverlay( const ImVec2& ul, const ImVec2& dr ) {}
|
||||||
|
virtual void DrawFinished() {}
|
||||||
|
|
||||||
virtual bool IsEmpty() const { return false; }
|
virtual bool IsEmpty() const { return false; }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user