Remove unneeded parameter.

This commit is contained in:
Bartosz Taudul 2020-08-01 12:03:11 +02:00
parent 6836014caa
commit 6d0d12ce78
3 changed files with 11 additions and 11 deletions

View File

@ -38,12 +38,12 @@ bool IsMouseClicked( ImGuiMouseButton button )
return s_mouse.mouseClicked[button];
}
bool IsMouseDragging( ImGuiMouseButton button, float lock_threshold )
bool IsMouseDragging( ImGuiMouseButton button )
{
return s_mouse.mouseDragging[button];
}
ImVec2 GetMouseDragDelta( ImGuiMouseButton button, float lock_threshold )
ImVec2 GetMouseDragDelta( ImGuiMouseButton button )
{
return s_mouse.mouseDragDelta[button];
}

View File

@ -10,8 +10,8 @@ void MouseFrame();
bool IsMouseDown( ImGuiMouseButton button );
bool IsMouseClicked( ImGuiMouseButton button );
bool IsMouseDragging( ImGuiMouseButton button, float lock_threshold = -1.f );
ImVec2 GetMouseDragDelta( ImGuiMouseButton button, float lock_threshold = -1.f );
bool IsMouseDragging( ImGuiMouseButton button );
ImVec2 GetMouseDragDelta( ImGuiMouseButton button );
}

View File

@ -1376,10 +1376,10 @@ void View::DrawFrames()
if( hover )
{
if( IsMouseDragging( 1, 0 ) )
if( IsMouseDragging( 1 ) )
{
m_pause = true;
const auto delta = GetMouseDragDelta( 1, 0 ).x;
const auto delta = GetMouseDragDelta( 1 ).x;
if( abs( delta ) >= fwidth )
{
const auto d = (int)delta / fwidth;
@ -1817,7 +1817,7 @@ void View::HandleZoneViewMouse( int64_t timespan, const ImVec2& wpos, float w, d
m_highlight.active = true;
m_highlight.start = m_highlight.end = m_vd.zvStart + ( io.MousePos.x - wpos.x ) * nspx;
}
else if( IsMouseDragging( 0, 0 ) )
else if( IsMouseDragging( 0 ) )
{
m_highlight.end = m_vd.zvStart + ( io.MousePos.x - wpos.x ) * nspx;
}
@ -1843,7 +1843,7 @@ void View::HandleZoneViewMouse( int64_t timespan, const ImVec2& wpos, float w, d
m_highlightZoom.active = true;
m_highlightZoom.start = m_highlightZoom.end = m_vd.zvStart + ( io.MousePos.x - wpos.x ) * nspx;
}
else if( IsMouseDragging( 2, 0 ) )
else if( IsMouseDragging( 2 ) )
{
m_highlightZoom.end = m_vd.zvStart + ( io.MousePos.x - wpos.x ) * nspx;
}
@ -1885,12 +1885,12 @@ void View::HandleZoneViewMouse( int64_t timespan, const ImVec2& wpos, float w, d
}
const auto hwheel_delta = io.MouseWheelH * 100.f;
if( IsMouseDragging( 1, 0 ) || hwheel_delta != 0 )
if( IsMouseDragging( 1 ) || hwheel_delta != 0 )
{
m_pause = true;
m_zoomAnim.active = false;
if( !m_playback.pause && m_playback.sync ) m_playback.pause = true;
const auto delta = GetMouseDragDelta( 1, 0 );
const auto delta = GetMouseDragDelta( 1 );
const auto dpx = int64_t( (delta.x * nspx) + (hwheel_delta * nspx));
if( dpx != 0 )
{
@ -10014,7 +10014,7 @@ void View::DrawFindZone()
m_findZone.hlOrig_t0 = t0;
m_findZone.hlOrig_t1 = t1;
}
else if( IsMouseDragging( 0, 0 ) )
else if( IsMouseDragging( 0 ) )
{
if( t0 < m_findZone.hlOrig_t0 )
{