mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-27 00:04:35 +00:00
Merge pull request #32 from jmanc3/support-horizontal-scrolling
Added support for horizontal scrolling.
This commit is contained in:
commit
47b8385c5a
@ -1757,13 +1757,14 @@ void View::HandleZoneViewMouse( int64_t timespan, const ImVec2& wpos, float w, d
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ImGui::IsMouseDragging( 1, 0 ) )
|
const auto hwheel_delta = io.MouseWheelH * 100.f;
|
||||||
|
if( ImGui::IsMouseDragging( 1, 0 ) || hwheel_delta != 0 )
|
||||||
{
|
{
|
||||||
m_pause = true;
|
m_pause = true;
|
||||||
m_zoomAnim.active = false;
|
m_zoomAnim.active = false;
|
||||||
if( !m_playback.pause && m_playback.sync ) m_playback.pause = true;
|
if( !m_playback.pause && m_playback.sync ) m_playback.pause = true;
|
||||||
const auto delta = ImGui::GetMouseDragDelta( 1, 0 );
|
const auto delta = ImGui::GetMouseDragDelta( 1, 0 );
|
||||||
const auto dpx = int64_t( delta.x * nspx );
|
const auto dpx = int64_t( (delta.x * nspx) + (hwheel_delta * nspx));
|
||||||
if( dpx != 0 )
|
if( dpx != 0 )
|
||||||
{
|
{
|
||||||
m_vd.zvStart -= dpx;
|
m_vd.zvStart -= dpx;
|
||||||
|
Loading…
Reference in New Issue
Block a user