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:
oy 2011-04-13 17:47:02 +02:00
parent 537e5fa7b6
commit 876eac1048

View file

@ -2850,11 +2850,6 @@ void CEditor::RenderEnvelopeEditor(CUIRect View)
} }
else 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(Input()->KeyPressed(KEY_LSHIFT) || Input()->KeyPressed(KEY_RSHIFT))
{ {
if(i != 0) 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; 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; m_Map.m_Modified = true;
} }