mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-13 00:27:40 +02:00
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
This commit is contained in:
29
Assets/Scripts/LevelEditor/Timeline/MiddleScrollRect.cs
Normal file
29
Assets/Scripts/LevelEditor/Timeline/MiddleScrollRect.cs
Normal file
@ -0,0 +1,29 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user