mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-10 19:55:09 +00:00
f4580eedfb
* 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
32 lines
No EOL
1.1 KiB
C#
32 lines
No EOL
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);
|
|
}
|
|
}
|
|
} |