Pass yMin, yMax through TimelineContext.

This commit is contained in:
Bartosz Taudul
2023-03-15 23:56:57 +01:00
parent c81ef177ab
commit 9538fa99ca
11 changed files with 21 additions and 18 deletions

View File

@@ -110,6 +110,8 @@ void TimelineController::End( double pxns, const ImVec2& wpos, bool hover, bool
ctx.w = ImGui::GetContentRegionAvail().x - 1;
ctx.ty = ImGui::GetTextLineHeight();
ctx.scale = GetScale();
ctx.yMin = yMin;
ctx.yMax = yMax;
ctx.pxns = pxns;
ctx.nspx = 1.0 / pxns;
ctx.wpos = wpos;
@@ -127,7 +129,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, yMin, yMax );
item->Draw( m_firstFrame, ctx, yOffset, hover );
if( m_firstFrame ) currentFrameItemHeight = item->GetNextFrameHeight();
yOffset += currentFrameItemHeight;
}