fixed issue #150

holding CTRL while moving a point allows to be a lot more precise
This commit is contained in:
SushiTee 2010-07-11 14:27:02 +02:00 committed by oy
parent b6d07edda8
commit 97204482e2

View file

@ -2588,12 +2588,20 @@ void CEditor::RenderEnvelopeEditor(CUIRect View)
}
else
{
pEnvelope->m_lPoints[i].m_aValues[c] -= f2fx(m_MouseDeltaY*ValueScale);
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_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)
{
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)
@ -2620,7 +2628,7 @@ void CEditor::RenderEnvelopeEditor(CUIRect View)
ColorMod = 100.0f;
Graphics()->SetColor(1,0.75f,0.75f,1);
m_pTooltip = Localize("Left mouse to drag. Hold shift to alter time point aswell. Right click to delete.");
m_pTooltip = Localize("Left mouse to drag. Hold ctfl to be more precise. Hold shift to alter time point aswell. Right click to delete.");
}
if(UI()->ActiveItem() == pId || UI()->HotItem() == pId)