fix event grid not scaling with song (#172)

This commit is contained in:
minenice55 2022-09-19 10:04:56 -04:00 committed by GitHub
parent bccd88e164
commit af8dd6142e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View file

@ -4820,7 +4820,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0} m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: -289.15002, y: 2} m_AnchoredPosition: {x: -289.15005, y: 2}
m_SizeDelta: {x: -578.29, y: 49.92} m_SizeDelta: {x: -578.29, y: 49.92}
m_Pivot: {x: 0.5, y: 0} m_Pivot: {x: 0.5, y: 0}
--- !u!114 &156962255 --- !u!114 &156962255
@ -25345,7 +25345,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 1589389271} m_HandleRect: {fileID: 1589389271}
m_Direction: 2 m_Direction: 2
m_Value: 1 m_Value: 1
m_Size: 0.99759334 m_Size: 0.9999893
m_NumberOfSteps: 0 m_NumberOfSteps: 0
m_OnValueChanged: m_OnValueChanged:
m_PersistentCalls: m_PersistentCalls:
@ -32369,7 +32369,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5} m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5} m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: 0, y: 129.91068} m_AnchoredPosition: {x: 0, y: 129.90404}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 1} m_Pivot: {x: 0.5, y: 1}
--- !u!114 &1154875944 --- !u!114 &1154875944
@ -49282,7 +49282,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: -84.99005} m_AnchoredPosition: {x: 0, y: -84.99002}
m_SizeDelta: {x: 320, y: -84.99} m_SizeDelta: {x: 320, y: -84.99}
m_Pivot: {x: 0, y: 1} m_Pivot: {x: 0, y: 1}
--- !u!1 &1852819572 --- !u!1 &1852819572

View file

@ -282,6 +282,7 @@ namespace HeavenStudio.Editor.Track
if (songBeats == 0) songBeats = 320; if (songBeats == 0) songBeats = 320;
else songBeats += 10; else songBeats += 10;
TimelineContent.sizeDelta = new Vector2(songBeats, currentSizeDelta.y); TimelineContent.sizeDelta = new Vector2(songBeats, currentSizeDelta.y);
TimelineEventGrid.sizeDelta = new Vector2(songBeats, currentSizeDelta.y);
} }
public void AutoBtnUpdate() public void AutoBtnUpdate()