HeavenStudioPlus/Assets/Scripts/LevelEditor/Timeline/MiddleScrollRect.cs
Braedon Lewis c7d829c033 General editor improvements (#257)
* Spaceball cleanup and small bug fix

* Replace old hit sound in spaceball

* Camera filters

* added 9 new filters, including 3 types of sepia

* oops

* remark

* normalization of fade out and fade in on filters are by 100

* GenerateFilterTypeEnum comments

* Pure black and white filter

* Zooming

* Constant playback bar offset

* Prepare box selector rewrite

* Update icons, finalize
2023-02-04 22:05:36 -05:00

29 lines
No EOL
972 B
C#

using UnityEngine.EventSystems;
using UnityEngine.UI;
namespace HeavenStudio.Editor.Track
{
public class MiddleScrollRect : ScrollRect
{
public override void OnBeginDrag(PointerEventData eventData)
{
if (eventData.button != PointerEventData.InputButton.Middle) return;
eventData.button = PointerEventData.InputButton.Left;
base.OnBeginDrag(eventData);
}
public override void OnEndDrag(PointerEventData eventData)
{
if (eventData.button != PointerEventData.InputButton.Middle) return;
eventData.button = PointerEventData.InputButton.Left;
base.OnEndDrag(eventData);
}
public override void OnDrag(PointerEventData eventData)
{
if (eventData.button != PointerEventData.InputButton.Middle) return;
eventData.button = PointerEventData.InputButton.Left;
base.OnDrag(eventData);
}
}
}