tracy/server/TracyTimelineController.cpp
2022-08-15 13:29:45 +02:00

30 lines
459 B
C++

#include "imgui.h"
#include "TracyTimelineController.hpp"
namespace tracy
{
TimelineController::TimelineController()
: m_height( 0 )
, m_offset( 0 )
, m_scroll( 0 )
{
}
void TimelineController::End( float offset )
{
const auto scrollPos = ImGui::GetScrollY();
if( scrollPos == 0 && m_scroll != 0 )
{
m_height = 0;
}
else
{
if( offset > m_height ) m_height = offset;
}
m_scroll = scrollPos;
}
}