Move hover flag to TimelineContext.

This commit is contained in:
Bartosz Taudul
2023-03-18 16:07:56 +01:00
parent c75bec9122
commit 0a32929b0b
11 changed files with 33 additions and 31 deletions

View File

@@ -115,6 +115,7 @@ void TimelineController::End( double pxns, const ImVec2& wpos, bool hover, bool
ctx.pxns = pxns;
ctx.nspx = 1.0 / pxns;
ctx.wpos = wpos;
ctx.hover = hover;
for( auto& item : m_items )
{
@@ -129,7 +130,7 @@ void TimelineController::End( double pxns, const ImVec2& wpos, bool hover, bool
for( auto& item : m_items )
{
auto currentFrameItemHeight = item->GetNextFrameHeight();
item->Draw( m_firstFrame, ctx, yOffset, hover );
item->Draw( m_firstFrame, ctx, yOffset );
if( m_firstFrame ) currentFrameItemHeight = item->GetNextFrameHeight();
yOffset += currentFrameItemHeight;
}