mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
added fix to make [Shift] only change the time of the point and not his value for envelopes in map editor by Choupon
This commit is contained in:
parent
537e5fa7b6
commit
876eac1048
|
@ -2850,11 +2850,6 @@ void CEditor::RenderEnvelopeEditor(CUIRect View)
|
|||
}
|
||||
else
|
||||
{
|
||||
if((Input()->KeyPressed(KEY_LCTRL) || Input()->KeyPressed(KEY_RCTRL)))
|
||||
pEnvelope->m_lPoints[i].m_aValues[c] -= f2fx(m_MouseDeltaY*0.001f);
|
||||
else
|
||||
pEnvelope->m_lPoints[i].m_aValues[c] -= f2fx(m_MouseDeltaY*ValueScale);
|
||||
|
||||
if(Input()->KeyPressed(KEY_LSHIFT) || Input()->KeyPressed(KEY_RSHIFT))
|
||||
{
|
||||
if(i != 0)
|
||||
|
@ -2869,6 +2864,13 @@ void CEditor::RenderEnvelopeEditor(CUIRect View)
|
|||
pEnvelope->m_lPoints[i].m_Time = pEnvelope->m_lPoints[i+1].m_Time - 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if((Input()->KeyPressed(KEY_LCTRL) || Input()->KeyPressed(KEY_RCTRL)))
|
||||
pEnvelope->m_lPoints[i].m_aValues[c] -= f2fx(m_MouseDeltaY*0.001f);
|
||||
else
|
||||
pEnvelope->m_lPoints[i].m_aValues[c] -= f2fx(m_MouseDeltaY*ValueScale);
|
||||
}
|
||||
m_Map.m_Modified = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue