You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
928 B
37 lines
928 B
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 && e.button == (int)MouseButton.LeftMouse)
|
|
{
|
|
VFXNodeUI slotContainer = (VFXNodeUI)target;
|
|
|
|
slotContainer.controller.superCollapsed = !slotContainer.superCollapsed;
|
|
}
|
|
}
|
|
}
|
|
}
|