mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
fixed last commit
This commit is contained in:
parent
97204482e2
commit
bc8274f48b
|
@ -2595,13 +2595,12 @@ void CEditor::RenderEnvelopeEditor(CUIRect View)
|
|||
|
||||
if(Input()->KeyPressed(KEY_LSHIFT) || Input()->KeyPressed(KEY_RSHIFT))
|
||||
{
|
||||
if((Input()->KeyPressed(KEY_LCTRL) || Input()->KeyPressed(KEY_RCTRL)))
|
||||
pEnvelope->m_lPoints[i].m_Time += (int)((m_MouseDeltaX));
|
||||
else
|
||||
pEnvelope->m_lPoints[i].m_Time += (int)((m_MouseDeltaX*TimeScale)*1000.0f);
|
||||
|
||||
if(i != 0)
|
||||
{
|
||||
if((Input()->KeyPressed(KEY_LCTRL) || Input()->KeyPressed(KEY_RCTRL)))
|
||||
pEnvelope->m_lPoints[i].m_Time += (int)((m_MouseDeltaX));
|
||||
else
|
||||
pEnvelope->m_lPoints[i].m_Time += (int)((m_MouseDeltaX*TimeScale)*1000.0f);
|
||||
if(pEnvelope->m_lPoints[i].m_Time < pEnvelope->m_lPoints[i-1].m_Time)
|
||||
pEnvelope->m_lPoints[i].m_Time = pEnvelope->m_lPoints[i-1].m_Time + 1;
|
||||
if(i+1 != pEnvelope->m_lPoints.size() && pEnvelope->m_lPoints[i].m_Time > pEnvelope->m_lPoints[i+1].m_Time)
|
||||
|
|
Loading…
Reference in a new issue