GlobalGameJame/Library/PackageCache/com.unity.timeline@1.2.10/Editor/Manipulators/Sequence/TrackZoom.cs
JonatanRek bea2dce063 Initial
test
2020-01-31 16:10:04 +01:00

21 lines
533 B
C#

using UnityEngine;
using UnityEngine.Timeline;
namespace UnityEditor.Timeline
{
class TrackZoom : Manipulator
{
// only handles 'vertical' zoom. horizontal is handled in timelineGUI
protected override bool MouseWheel(Event evt, WindowState state)
{
if (EditorGUI.actionKey)
{
state.trackScale = Mathf.Min(Mathf.Max(state.trackScale + (evt.delta.y * 0.1f), 1.0f), 100.0f);
return true;
}
return false;
}
}
}