mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 11:37:41 +02:00
Change Project License to MIT (#700)
* license change replace unneeded package * reword this
This commit is contained in:
@ -5,7 +5,7 @@ using UnityEngine.UI;
|
||||
using UnityEngine.EventSystems;
|
||||
|
||||
using TMPro;
|
||||
using Starpelly;
|
||||
|
||||
|
||||
namespace HeavenStudio.Editor.Track
|
||||
{
|
||||
|
@ -4,8 +4,9 @@ using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using System;
|
||||
|
||||
using HeavenStudio.Util;
|
||||
|
||||
using TMPro;
|
||||
using Starpelly;
|
||||
using Jukebox;
|
||||
using Jukebox.Legacy;
|
||||
|
||||
|
@ -6,11 +6,12 @@ using UnityEngine.UI;
|
||||
using UnityEngine.EventSystems;
|
||||
|
||||
using TMPro;
|
||||
using Starpelly;
|
||||
using Jukebox;
|
||||
using Newtonsoft.Json;
|
||||
using System.Linq;
|
||||
|
||||
using HeavenStudio.Util;
|
||||
|
||||
namespace HeavenStudio.Editor.Track
|
||||
{
|
||||
public class Timeline : MonoBehaviour
|
||||
@ -41,7 +42,7 @@ namespace HeavenStudio.Editor.Track
|
||||
public float VerticalZoom { get; private set; } = 1.0f;
|
||||
public float MousePos2Beat { get; private set; }
|
||||
public float MousePos2Layer { get; private set; }
|
||||
public float MousePos2BeatSnap => Mathp.Round2Nearest(MousePos2Beat + (SnapInterval() * 0.5f), SnapInterval());
|
||||
public float MousePos2BeatSnap => HeavenStudio.Util.MathUtils.Round2Nearest(MousePos2Beat + (SnapInterval() * 0.5f), SnapInterval());
|
||||
public bool MouseInTimeline { get; private set; }
|
||||
|
||||
private Vector2 relativeMousePos;
|
||||
@ -380,11 +381,6 @@ namespace HeavenStudio.Editor.Track
|
||||
}
|
||||
}
|
||||
|
||||
public static string RandomID()
|
||||
{
|
||||
return Starpelly.Random.Strings.RandomString(Starpelly.Enums.Strings.StringType.Alphanumeric, 128);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void Update()
|
||||
@ -435,7 +431,7 @@ namespace HeavenStudio.Editor.Track
|
||||
var left = leftSide;
|
||||
var viewportWidth = TimelineScroll.viewport.rect.width;
|
||||
var localPointRec = Mathf.Lerp(left, left + (viewportWidth / Zoom),
|
||||
Mathp.Normalize(Input.mousePosition.x, viewportPos.x, viewportPos.x + viewportWidth));
|
||||
MathUtils.Normalize(Input.mousePosition.x, viewportPos.x, viewportPos.x + viewportWidth));
|
||||
|
||||
var xPixels = (localPointRec * incre);
|
||||
xPixels *= (Zoom);
|
||||
@ -824,7 +820,7 @@ namespace HeavenStudio.Editor.Track
|
||||
}
|
||||
}
|
||||
int height = 200;
|
||||
Color col = Colors.Hex2RGB("727272");
|
||||
Color col = "727272".Hex2RGB();
|
||||
col.a = 0.25f;
|
||||
|
||||
Texture2D tex = new Texture2D(wave.Length, height, TextureFormat.RGBA32, false);
|
||||
@ -982,7 +978,7 @@ namespace HeavenStudio.Editor.Track
|
||||
public float SnapToLayer(float y)
|
||||
{
|
||||
float size = LayerHeight();
|
||||
return Mathf.Clamp(Mathp.Round2Nearest(y, size), -size * (LayerCount - 1), 0f);
|
||||
return Mathf.Clamp(MathUtils.Round2Nearest(y, size), -size * (LayerCount - 1), 0f);
|
||||
}
|
||||
|
||||
public float LayerHeight()
|
||||
@ -1008,7 +1004,7 @@ namespace HeavenStudio.Editor.Track
|
||||
}
|
||||
else
|
||||
{
|
||||
float spd = Mathp.Round2Nearest(speed, SpeedSnap);
|
||||
float spd = MathUtils.Round2Nearest(speed, SpeedSnap);
|
||||
PlaybackSpeed.transform.GetChild(3).GetComponent<TMP_Text>().text = $"Playback Speed: {spd}x";
|
||||
Conductor.instance.SetTimelinePitch(spd);
|
||||
PlaybackSpeed.value = spd;
|
||||
|
@ -1,7 +1,7 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
using Starpelly;
|
||||
|
||||
using Jukebox;
|
||||
using TMPro;
|
||||
using System.Linq;
|
||||
@ -146,7 +146,7 @@ namespace HeavenStudio.Editor.Track
|
||||
public void UpdateMarker()
|
||||
{
|
||||
mouseOver = Timeline.instance.timelineState.selected && Timeline.instance.MouseInTimeline &&
|
||||
Timeline.instance.MousePos2Beat.IsWithin((float)entity.beat, (float)entity.beat + entity.length) &&
|
||||
HeavenStudio.Util.MathUtils.IsBetween(Timeline.instance.MousePos2Beat, (float)entity.beat, (float)entity.beat + entity.length) &&
|
||||
Timeline.instance.MousePos2Layer == (int)entity["track"];
|
||||
|
||||
eventLabel.overflowMode = (mouseHovering || moving || resizing || inResizeRegion) ? TextOverflowModes.Overflow : TextOverflowModes.Ellipsis;
|
||||
|
Reference in New Issue
Block a user