mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-13 14:07:37 +02:00
Change Project License to MIT (#700)
* license change replace unneeded package * reword this
This commit is contained in:
@ -1,10 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using Starpelly;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
using HeavenStudio.Util;
|
||||
|
||||
namespace HeavenStudio.Editor.Track
|
||||
{
|
||||
public class BeatGrid : MonoBehaviour
|
||||
@ -49,8 +50,8 @@ namespace HeavenStudio.Editor.Track
|
||||
{
|
||||
if (Editor.instance.fullscreen) return;
|
||||
|
||||
// var x = Mathp.Round2Nearest(contentPosX, Timeline.instance.PixelsPerBeat);
|
||||
var x = Mathp.Round2Nearest(-scrollRect.content.anchoredPosition.x, Timeline.instance.PixelsPerBeat);
|
||||
// var x = MathUtils.Round2Nearest(contentPosX, Timeline.instance.PixelsPerBeat);
|
||||
var x = MathUtils.Round2Nearest(-scrollRect.content.anchoredPosition.x, Timeline.instance.PixelsPerBeat);
|
||||
var pos = new Vector3(x, transform.localPosition.y, transform.localPosition.z);
|
||||
transform.localPosition = pos;
|
||||
rectTransform.anchoredPosition = new Vector3(rectTransform.anchoredPosition.x, rectTransform.anchoredPosition.y, 0);
|
||||
|
@ -1,10 +1,10 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
using HeavenStudio.Util;
|
||||
using HeavenStudio.Editor.Track;
|
||||
|
||||
using DG.Tweening;
|
||||
using Starpelly;
|
||||
|
||||
namespace HeavenStudio.Editor
|
||||
{
|
||||
|
@ -7,9 +7,8 @@ using UnityEngine.UI;
|
||||
using Newtonsoft.Json;
|
||||
using TMPro;
|
||||
|
||||
using Starpelly;
|
||||
|
||||
using HeavenStudio.Common;
|
||||
using HeavenStudio.Util;
|
||||
using HeavenStudio.Editor.Track;
|
||||
|
||||
namespace HeavenStudio.Editor
|
||||
|
@ -5,7 +5,7 @@ using UnityEngine.UI;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using TMPro;
|
||||
using Starpelly;
|
||||
|
||||
|
||||
using HeavenStudio.Util;
|
||||
using Jukebox;
|
||||
|
@ -7,8 +7,8 @@ using UnityEngine.EventSystems;
|
||||
|
||||
using TMPro;
|
||||
using DG.Tweening;
|
||||
using Starpelly;
|
||||
|
||||
using HeavenStudio.Util;
|
||||
using HeavenStudio.Editor.Track;
|
||||
using System.Text;
|
||||
|
||||
|
@ -5,7 +5,7 @@ using UnityEngine.UI;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using TMPro;
|
||||
using Starpelly;
|
||||
|
||||
|
||||
using HeavenStudio.Util;
|
||||
using HeavenStudio.Editor;
|
||||
|
@ -5,7 +5,7 @@ using UnityEngine.UI;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using TMPro;
|
||||
using Starpelly;
|
||||
|
||||
|
||||
using HeavenStudio.Util;
|
||||
using HeavenStudio.Editor;
|
||||
|
@ -5,7 +5,7 @@ using UnityEngine.UI;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using TMPro;
|
||||
using Starpelly;
|
||||
|
||||
|
||||
using HeavenStudio.Util;
|
||||
using HeavenStudio.Editor;
|
||||
|
@ -5,7 +5,7 @@ using UnityEngine.UI;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using TMPro;
|
||||
using Starpelly;
|
||||
|
||||
|
||||
using HeavenStudio.Util;
|
||||
using HeavenStudio.Editor;
|
||||
|
@ -5,7 +5,7 @@ using UnityEngine.UI;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using TMPro;
|
||||
using Starpelly;
|
||||
|
||||
|
||||
using HeavenStudio.Util;
|
||||
using HeavenStudio.Editor;
|
||||
|
@ -5,7 +5,7 @@ using UnityEngine.UI;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using TMPro;
|
||||
using Starpelly;
|
||||
|
||||
|
||||
using HeavenStudio.Util;
|
||||
using HeavenStudio.Editor;
|
||||
|
@ -5,7 +5,7 @@ using UnityEngine.UI;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using TMPro;
|
||||
using Starpelly;
|
||||
|
||||
|
||||
using HeavenStudio.Util;
|
||||
using HeavenStudio.Editor;
|
||||
|
@ -5,7 +5,7 @@ using UnityEngine.UI;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using TMPro;
|
||||
using Starpelly;
|
||||
|
||||
|
||||
using HeavenStudio.Util;
|
||||
using HeavenStudio.Editor;
|
||||
|
@ -5,7 +5,7 @@ using UnityEngine.UI;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using TMPro;
|
||||
using Starpelly;
|
||||
|
||||
|
||||
using HeavenStudio.Util;
|
||||
using HeavenStudio.Editor;
|
||||
|
@ -5,7 +5,7 @@ using UnityEngine.UI;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using TMPro;
|
||||
using Starpelly;
|
||||
|
||||
|
||||
using HeavenStudio.Util;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
using HeavenStudio.Util;
|
||||
using HeavenStudio.Editor.Track;
|
||||
using Newtonsoft.Json;
|
||||
using Starpelly;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
@ -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