vertical timeline scrolling
This commit is contained in:
parent
bafb651796
commit
17f7b69852
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -14,8 +14,8 @@ RenderTexture:
|
||||||
m_DownscaleFallback: 0
|
m_DownscaleFallback: 0
|
||||||
m_IsAlphaChannelOptional: 0
|
m_IsAlphaChannelOptional: 0
|
||||||
serializedVersion: 5
|
serializedVersion: 5
|
||||||
m_Width: 1680
|
m_Width: 1129
|
||||||
m_Height: 945
|
m_Height: 635
|
||||||
m_AntiAliasing: 2
|
m_AntiAliasing: 2
|
||||||
m_MipCount: -1
|
m_MipCount: -1
|
||||||
m_DepthStencilFormat: 92
|
m_DepthStencilFormat: 92
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,8 @@ RenderTexture:
|
||||||
m_DownscaleFallback: 0
|
m_DownscaleFallback: 0
|
||||||
m_IsAlphaChannelOptional: 0
|
m_IsAlphaChannelOptional: 0
|
||||||
serializedVersion: 5
|
serializedVersion: 5
|
||||||
m_Width: 2520
|
m_Width: 1693
|
||||||
m_Height: 1417
|
m_Height: 952
|
||||||
m_AntiAliasing: 1
|
m_AntiAliasing: 1
|
||||||
m_MipCount: -1
|
m_MipCount: -1
|
||||||
m_DepthStencilFormat: 92
|
m_DepthStencilFormat: 92
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,8 +1,8 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
public static class AppInfo {
|
public static class AppInfo {
|
||||||
public const string Version = "0.0.988";
|
public const string Version = "0.0.989";
|
||||||
public static readonly DateTime Date = new DateTime(2023, 09, 25, 02, 33, 05, 270, DateTimeKind.Utc);
|
public static readonly DateTime Date = new DateTime(2023, 09, 25, 06, 36, 21, 213, DateTimeKind.Utc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,8 @@ namespace HeavenStudio.Editor.Track
|
||||||
var x = Mathp.Round2Nearest(contentPosX, Timeline.instance.PixelsPerBeat);
|
var x = Mathp.Round2Nearest(contentPosX, Timeline.instance.PixelsPerBeat);
|
||||||
var pos = new Vector3(x, transform.localPosition.y, transform.localPosition.z);
|
var pos = new Vector3(x, transform.localPosition.y, transform.localPosition.z);
|
||||||
transform.localPosition = pos;
|
transform.localPosition = pos;
|
||||||
GetComponent<RectTransform>().anchoredPosition = new Vector3(rectTransform.anchoredPosition.x, rectTransform.anchoredPosition.y, 0);
|
rectTransform.anchoredPosition = new Vector3(rectTransform.anchoredPosition.x, rectTransform.anchoredPosition.y, 0);
|
||||||
|
rectTransform.sizeDelta = new Vector2(rectTransform.sizeDelta.x, transform.parent.parent.parent.GetComponent<RectTransform>().rect.height);
|
||||||
|
|
||||||
UpdateCount();
|
UpdateCount();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ namespace HeavenStudio.Editor.Track
|
||||||
|
|
||||||
[Header("Components")]
|
[Header("Components")]
|
||||||
[SerializeField] private RawImage waveform;
|
[SerializeField] private RawImage waveform;
|
||||||
[SerializeField] private RawImage layerBG;
|
[SerializeField] private Image layerBG;
|
||||||
public Texture2D resizeCursor;
|
public Texture2D resizeCursor;
|
||||||
|
|
||||||
public float WidthPerBeat { get; private set; } = 100.0f;
|
public float WidthPerBeat { get; private set; } = 100.0f;
|
||||||
|
|
@ -139,6 +139,12 @@ namespace HeavenStudio.Editor.Track
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Header("Panels")]
|
||||||
|
[SerializeField] private RectTransform TopPanel;
|
||||||
|
[SerializeField] private RectTransform TopPanelContent;
|
||||||
|
[SerializeField] private RectTransform ContentPanel;
|
||||||
|
[SerializeField] private RectTransform OverlayPanel, OverlayPanelContent;
|
||||||
|
|
||||||
[Header("Timeline Components")]
|
[Header("Timeline Components")]
|
||||||
[SerializeField] private RectTransform TimelineSlider;
|
[SerializeField] private RectTransform TimelineSlider;
|
||||||
[SerializeField] private RectTransform TimelineGridSelect;
|
[SerializeField] private RectTransform TimelineGridSelect;
|
||||||
|
|
@ -230,7 +236,7 @@ namespace HeavenStudio.Editor.Track
|
||||||
|
|
||||||
for (var i = 0; i < LayerCount; i++)
|
for (var i = 0; i < LayerCount; i++)
|
||||||
{
|
{
|
||||||
var bg = Instantiate(layerBG.gameObject, layerBG.rectTransform.parent).GetComponent<RawImage>();
|
var bg = Instantiate(layerBG.gameObject, layerBG.rectTransform.parent).GetComponent<Image>();
|
||||||
if (i % 2 == 0) bg.enabled = false;
|
if (i % 2 == 0) bg.enabled = false;
|
||||||
}
|
}
|
||||||
layerBG.gameObject.SetActive(false);
|
layerBG.gameObject.SetActive(false);
|
||||||
|
|
@ -516,10 +522,37 @@ namespace HeavenStudio.Editor.Track
|
||||||
|
|
||||||
LayersRect.GetWorldCorners(LayerCorners);
|
LayersRect.GetWorldCorners(LayerCorners);
|
||||||
|
|
||||||
|
for (var i = 0; i < LayersRect.childCount; i++)
|
||||||
|
{
|
||||||
|
var layerRect = LayersRect.GetChild(i).GetComponent<RectTransform>();
|
||||||
|
layerRect.anchoredPosition = new Vector2(layerRect.anchoredPosition.x, -LayerHeight() * (i - 1));
|
||||||
|
layerRect.sizeDelta = new Vector2(layerRect.sizeDelta.x, LayerHeight());
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var i = 0; i < layerBG.rectTransform.parent.childCount; i++)
|
||||||
|
{
|
||||||
|
var layerRect = layerBG.rectTransform.parent.GetChild(i).GetComponent<RectTransform>();
|
||||||
|
layerRect.anchoredPosition = new Vector2(layerRect.anchoredPosition.x, -LayerHeight() * (i - 1));
|
||||||
|
layerRect.sizeDelta = new Vector2(layerRect.sizeDelta.x, LayerHeight());
|
||||||
|
}
|
||||||
|
|
||||||
|
TimelineContent.sizeDelta = new Vector2(TimelineContent.sizeDelta.x, LayerHeight() * LayerCount);
|
||||||
|
|
||||||
TimelineBlockManager.Instance.UpdateMarkers();
|
TimelineBlockManager.Instance.UpdateMarkers();
|
||||||
BoxSelection.instance.LayerSelectUpdate();
|
BoxSelection.instance.LayerSelectUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void LateUpdate()
|
||||||
|
{
|
||||||
|
TopPanelContent.anchoredPosition = new Vector2(TimelineContent.anchoredPosition.x, TopPanelContent.anchoredPosition.y);
|
||||||
|
TopPanelContent.sizeDelta = new Vector2(TimelineContent.sizeDelta.x, TopPanelContent.sizeDelta.y);
|
||||||
|
|
||||||
|
OverlayPanelContent.anchoredPosition = new Vector2(TimelineContent.anchoredPosition.x, OverlayPanelContent.anchoredPosition.y);
|
||||||
|
OverlayPanelContent.sizeDelta = new Vector2(TimelineContent.sizeDelta.x, OverlayPanelContent.sizeDelta.y);
|
||||||
|
|
||||||
|
LayersRect.anchoredPosition = new Vector2(LayersRect.anchoredPosition.x, TimelineContent.anchoredPosition.y);
|
||||||
|
}
|
||||||
|
|
||||||
public static float GetScaleModifier()
|
public static float GetScaleModifier()
|
||||||
{
|
{
|
||||||
Camera cam = Editor.instance.EditorCamera;
|
Camera cam = Editor.instance.EditorCamera;
|
||||||
|
|
@ -1007,7 +1040,9 @@ namespace HeavenStudio.Editor.Track
|
||||||
|
|
||||||
public float LayerHeight()
|
public float LayerHeight()
|
||||||
{
|
{
|
||||||
return LayersRect.rect.height / LayerCount;
|
var defaultHeight = 32;
|
||||||
|
return Mathf.Max(defaultHeight, (LayersRect.rect.height / LayerCount));
|
||||||
|
// return LayersRect.rect.height / LayerCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
public float LayerToY(int layer)
|
public float LayerToY(int layer)
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -134,7 +134,7 @@ PlayerSettings:
|
||||||
16:10: 1
|
16:10: 1
|
||||||
16:9: 1
|
16:9: 1
|
||||||
Others: 1
|
Others: 1
|
||||||
bundleVersion: 0.0.988
|
bundleVersion: 0.0.989
|
||||||
preloadedAssets:
|
preloadedAssets:
|
||||||
- {fileID: 102900000, guid: 5348c08b82446e0478cee8bda6c02cfc, type: 3}
|
- {fileID: 102900000, guid: 5348c08b82446e0478cee8bda6c02cfc, type: 3}
|
||||||
metroInputSource: 0
|
metroInputSource: 0
|
||||||
|
|
@ -158,11 +158,11 @@ PlayerSettings:
|
||||||
applicationIdentifier:
|
applicationIdentifier:
|
||||||
Standalone: com.RHeavenStudio.Heaven-Studio
|
Standalone: com.RHeavenStudio.Heaven-Studio
|
||||||
buildNumber:
|
buildNumber:
|
||||||
Standalone: 988
|
Standalone: 989
|
||||||
iPhone: 0
|
iPhone: 0
|
||||||
tvOS: 0
|
tvOS: 0
|
||||||
overrideDefaultApplicationIdentifier: 0
|
overrideDefaultApplicationIdentifier: 0
|
||||||
AndroidBundleVersionCode: 988
|
AndroidBundleVersionCode: 989
|
||||||
AndroidMinSdkVersion: 22
|
AndroidMinSdkVersion: 22
|
||||||
AndroidTargetSdkVersion: 0
|
AndroidTargetSdkVersion: 0
|
||||||
AndroidPreferredInstallLocation: 1
|
AndroidPreferredInstallLocation: 1
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue