12345678910111213141516171819202122232425262728293031323334353637 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using UnityEditor.Experimental.GraphView;
- using UnityEngine;
- using UnityEngine.UIElements;
- namespace UnityEditor.VFX.UI
- {
- class SuperCollapser : Manipulator
- {
- public SuperCollapser()
- {
- }
- protected override void RegisterCallbacksOnTarget()
- {
- target.RegisterCallback<MouseDownEvent>(OnMouseUp);
- }
- protected override void UnregisterCallbacksFromTarget()
- {
- target.UnregisterCallback<MouseDownEvent>(OnMouseUp);
- }
- void OnMouseUp(MouseDownEvent e)
- {
- if (e.clickCount == 2)
- {
- VFXNodeUI slotContainer = (VFXNodeUI)target;
- slotContainer.controller.superCollapsed = !slotContainer.superCollapsed;
- }
- }
- }
- }
|