From 97204482e2880da3474df6e0d6b3e2decf9c26e5 Mon Sep 17 00:00:00 2001 From: SushiTee Date: Sun, 11 Jul 2010 14:27:02 +0200 Subject: fixed issue #150 holding CTRL while moving a point allows to be a lot more precise --- src/game/editor/ed_editor.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/game/editor/ed_editor.cpp') diff --git a/src/game/editor/ed_editor.cpp b/src/game/editor/ed_editor.cpp index 468983f8..2bad1d2a 100644 --- a/src/game/editor/ed_editor.cpp +++ b/src/game/editor/ed_editor.cpp @@ -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) -- cgit 1.4.1