diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2020-08-20 23:40:50 -0400 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2020-08-20 23:40:50 -0400 |
| commit | 3af4c218c0e70167db23a6303d2af30aff37d2fe (patch) | |
| tree | 927f29edcf54ab562f40f3d1c6cb69287c7f5980 /Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Manipulator.cs | |
| parent | b6daed0af784f4e9bc13329dd87c671b06ee1c65 (diff) | |
| download | Project-Sandbox-3af4c218c0e70167db23a6303d2af30aff37d2fe.tar.gz Project-Sandbox-3af4c218c0e70167db23a6303d2af30aff37d2fe.tar.bz2 Project-Sandbox-3af4c218c0e70167db23a6303d2af30aff37d2fe.zip | |
Removed a bunch of stuff; Changes
Diffstat (limited to 'Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Manipulator.cs')
| -rw-r--r-- | Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Manipulator.cs | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Manipulator.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Manipulator.cs deleted file mode 100644 index d0aac15..0000000 --- a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Manipulator.cs +++ /dev/null @@ -1,91 +0,0 @@ -using UnityEngine; - -namespace UnityEditor.Timeline -{ - abstract class Manipulator - { - int m_Id; - - protected virtual bool MouseDown(Event evt, WindowState state) { return false; } - protected virtual bool MouseDrag(Event evt, WindowState state) { return false; } - protected virtual bool MouseWheel(Event evt, WindowState state) { return false; } - protected virtual bool MouseUp(Event evt, WindowState state) { return false; } - protected virtual bool DoubleClick(Event evt, WindowState state) { return false; } - protected virtual bool KeyDown(Event evt, WindowState state) { return false; } - protected virtual bool KeyUp(Event evt, WindowState state) { return false; } - protected virtual bool ContextClick(Event evt, WindowState state) { return false; } - protected virtual bool ValidateCommand(Event evt, WindowState state) { return false; } - protected virtual bool ExecuteCommand(Event evt, WindowState state) { return false; } - - public virtual void Overlay(Event evt, WindowState state) {} - - public bool HandleEvent(WindowState state) - { - if (m_Id == 0) - m_Id = GUIUtility.GetPermanentControlID(); - - bool isHandled = false; - var evt = Event.current; - - switch (evt.GetTypeForControl(m_Id)) - { - case EventType.ScrollWheel: - isHandled = MouseWheel(evt, state); - break; - - case EventType.MouseUp: - { - if (GUIUtility.hotControl == m_Id) - { - isHandled = MouseUp(evt, state); - - GUIUtility.hotControl = 0; - evt.Use(); - } - } - break; - - case EventType.MouseDown: - { - isHandled = evt.clickCount < 2 ? MouseDown(evt, state) : DoubleClick(evt, state); - - if (isHandled) - GUIUtility.hotControl = m_Id; - } - break; - - case EventType.MouseDrag: - { - if (GUIUtility.hotControl == m_Id) - isHandled = MouseDrag(evt, state); - } - break; - - case EventType.KeyDown: - isHandled = KeyDown(evt, state); - break; - - case EventType.KeyUp: - isHandled = KeyUp(evt, state); - break; - - case EventType.ContextClick: - isHandled = ContextClick(evt, state); - break; - - case EventType.ValidateCommand: - isHandled = ValidateCommand(evt, state); - break; - - case EventType.ExecuteCommand: - isHandled = ExecuteCommand(evt, state); - break; - } - - if (isHandled) - evt.Use(); - - return isHandled; - } - } -} |
