Call a hook when a timeline item header zooms to its range.

This commit is contained in:
Bartosz Taudul
2026-10-12 21:11:28 +02:00
parent 6c04ee9714
commit f5c0f348d7
2 changed files with 2 additions and 0 deletions

View File

@@ -108,6 +108,7 @@ void TimelineItem::Draw( bool firstFrame, const TimelineContext& ctx, int yOffse
if( t0 < t1 )
{
m_view.ZoomToRange( t0, t1 );
HeaderZoomed();
}
}
if( IsMouseClicked( ImGuiMouseButton_Right ) )

View File

@@ -51,6 +51,7 @@ protected:
virtual void HeaderTooltip( const char* label ) const {};
virtual void HeaderExtraContents( const TimelineContext& ctx, int offset, float labelWidth ) {};
virtual void HeaderZoomed() {}
virtual int64_t RangeBegin() const = 0;
virtual int64_t RangeEnd() const = 0;