HeavenStudio/Assets/Scripts/LevelEditor/Timeline/MiddleScrollRect.cs
Braedon Lewis b45c4315b5
Editor bug fixes (#261)
* 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

* Bug fixes
2023-02-05 14:48:49 -05:00

32 lines
1.1 KiB
C#

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