fix block window rescaling

This commit is contained in:
Braedon Lewis 2023-09-27 13:34:08 -04:00
parent 28ef28e0d8
commit fd944a7abb
12 changed files with 72 additions and 1496 deletions

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

View file

@ -14,8 +14,8 @@ RenderTexture:
m_DownscaleFallback: 0 m_DownscaleFallback: 0
m_IsAlphaChannelOptional: 0 m_IsAlphaChannelOptional: 0
serializedVersion: 5 serializedVersion: 5
m_Width: 1365 m_Width: 1108
m_Height: 768 m_Height: 623
m_AntiAliasing: 2 m_AntiAliasing: 2
m_MipCount: -1 m_MipCount: -1
m_DepthStencilFormat: 92 m_DepthStencilFormat: 92

View file

@ -14,8 +14,8 @@ RenderTexture:
m_DownscaleFallback: 0 m_DownscaleFallback: 0
m_IsAlphaChannelOptional: 0 m_IsAlphaChannelOptional: 0
serializedVersion: 5 serializedVersion: 5
m_Width: 2047 m_Width: 1662
m_Height: 1152 m_Height: 934
m_AntiAliasing: 1 m_AntiAliasing: 1
m_MipCount: -1 m_MipCount: -1
m_DepthStencilFormat: 92 m_DepthStencilFormat: 92

View file

@ -7217,7 +7217,7 @@ MonoBehaviour:
m_faceColor: m_faceColor:
serializedVersion: 2 serializedVersion: 2
rgba: 4294967295 rgba: 4294967295
m_fontSize: 14 m_fontSize: 13.1
m_fontSizeBase: 14.3 m_fontSizeBase: 14.3
m_fontWeight: 400 m_fontWeight: 400
m_enableAutoSizing: 1 m_enableAutoSizing: 1
@ -8613,7 +8613,6 @@ GameObject:
serializedVersion: 6 serializedVersion: 6
m_Component: m_Component:
- component: {fileID: 358789044} - component: {fileID: 358789044}
- component: {fileID: 358789046}
m_Layer: 8 m_Layer: 8
m_Name: Content m_Name: Content
m_TagString: Untagged m_TagString: Untagged
@ -8641,23 +8640,9 @@ 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: 1} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 3.4257812, y: -19.710938} m_AnchoredPosition: {x: 3.4253845, y: 0}
m_SizeDelta: {x: -6.85, y: -39.43} m_SizeDelta: {x: -6.8507814, y: 36}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &358789046
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 358789043}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3312d7739989d2b4e91e6319e9a96d76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding: {x: 0, y: 0, z: 0, w: 0}
m_Softness: {x: 0, y: 0}
--- !u!1 &365690205 --- !u!1 &365690205
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -10073,7 +10058,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 177.66988, y: -60.01} m_AnchoredPosition: {x: 177.66986, y: -60.01}
m_SizeDelta: {x: 42, y: 42} m_SizeDelta: {x: 42, y: 42}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &449176922 --- !u!114 &449176922
@ -13498,8 +13483,8 @@ 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: 1} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: -13019.309} m_AnchoredPosition: {x: 0, y: 0.00048828125}
m_SizeDelta: {x: 0, y: 26117.389} m_SizeDelta: {x: 0, y: -0.0009765625}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &590210127 --- !u!114 &590210127
MonoBehaviour: MonoBehaviour:
@ -13513,7 +13498,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 3312d7739989d2b4e91e6319e9a96d76, type: 3} m_Script: {fileID: 11500000, guid: 3312d7739989d2b4e91e6319e9a96d76, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Padding: {x: 0, y: 0, z: 0, w: 41.38} m_Padding: {x: 0, y: 0, z: 0, w: 0}
m_Softness: {x: 0, y: 0} m_Softness: {x: 0, y: 0}
--- !u!1 &597773738 --- !u!1 &597773738
GameObject: GameObject:
@ -20669,7 +20654,7 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 1589389272} m_TargetGraphic: {fileID: 1589389272}
m_HandleRect: {fileID: 1589389271} m_HandleRect: {fileID: 1589389271}
m_Direction: 2 m_Direction: 2
m_Value: 0 m_Value: 1
m_Size: 1 m_Size: 1
m_NumberOfSteps: 0 m_NumberOfSteps: 0
m_OnValueChanged: m_OnValueChanged:
@ -25238,7 +25223,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: 135.38774} m_AnchoredPosition: {x: 0, y: 122.93877}
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!222 &1154875945 --- !u!222 &1154875945
@ -34283,8 +34268,8 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 1220118245} m_TargetGraphic: {fileID: 1220118245}
m_HandleRect: {fileID: 1220118244} m_HandleRect: {fileID: 1220118244}
m_Direction: 2 m_Direction: 2
m_Value: 1.0000004 m_Value: 1.0000002
m_Size: 0.72349864 m_Size: 0.6203498
m_NumberOfSteps: 0 m_NumberOfSteps: 0
m_OnValueChanged: m_OnValueChanged:
m_PersistentCalls: m_PersistentCalls:
@ -37977,7 +37962,6 @@ MonoBehaviour:
SongBeat: {fileID: 932211468} SongBeat: {fileID: 932211468}
SongPos: {fileID: 1567318397} SongPos: {fileID: 1567318397}
CurrentTempo: {fileID: 1783963081} CurrentTempo: {fileID: 1783963081}
eventObjs: []
LayerCount: 10 LayerCount: 10
metronomeEnabled: 0 metronomeEnabled: 0
resizable: 0 resizable: 0

View file

@ -1,8 +1,8 @@
using System; using System;
public static class AppInfo { public static class AppInfo {
public const string Version = "0.0.996"; public const string Version = "0.0.997";
public static readonly DateTime Date = new DateTime(2023, 09, 27, 07, 19, 01, 343, DateTimeKind.Utc); public static readonly DateTime Date = new DateTime(2023, 09, 27, 17, 27, 16, 869, DateTimeKind.Utc);
} }

View file

@ -142,6 +142,8 @@ namespace HeavenStudio.Editor
SelectedMinigame = EventCaller.instance.GetMinigame(gameName); SelectedMinigame = EventCaller.instance.GetMinigame(gameName);
if (SelectedMinigame == null) { if (SelectedMinigame == null) {
SelectGame("gameManager"); SelectGame("gameManager");
currentEventIndex = 0;
UpdateIndex(0, false);
Debug.LogWarning($"SelectGame() has failed, did you mean to input '{gameName}'?"); Debug.LogWarning($"SelectGame() has failed, did you mean to input '{gameName}'?");
return; return;
} }

View file

@ -185,6 +185,8 @@ namespace HeavenStudio.Editor.Track
public float leftSide => (RealTimelineContent.anchoredPosition.x / PixelsPerBeat) * -1; public float leftSide => (RealTimelineContent.anchoredPosition.x / PixelsPerBeat) * -1;
public float rightSide => (TimelineScroll.viewport.rect.width / PixelsPerBeat) + leftSide; public float rightSide => (TimelineScroll.viewport.rect.width / PixelsPerBeat) + leftSide;
private Vector2 lastViewportSize;
public static Timeline instance { get; private set; } public static Timeline instance { get; private set; }
[HideInInspector] [HideInInspector]
@ -605,6 +607,14 @@ namespace HeavenStudio.Editor.Track
public void LateUpdate() public void LateUpdate()
{ {
if (TimelineScroll.viewport.rect.size != lastViewportSize)
{
foreach (var block in TimelineBlockManager.Instance.EntityMarkers)
{
block.Value.SetWidthHeight();
}
}
TimelineBlockManager.Instance.UpdateMarkers(); TimelineBlockManager.Instance.UpdateMarkers();
BoxSelection.instance.LayerSelectUpdate(); BoxSelection.instance.LayerSelectUpdate();
@ -617,6 +627,8 @@ namespace HeavenStudio.Editor.Track
OverlayPanelContent.sizeDelta = new Vector2(TimelineContent.sizeDelta.x, OverlayPanelContent.sizeDelta.y); OverlayPanelContent.sizeDelta = new Vector2(TimelineContent.sizeDelta.x, OverlayPanelContent.sizeDelta.y);
LayersRect.anchoredPosition = new Vector2(LayersRect.anchoredPosition.x, TimelineContent.anchoredPosition.y); LayersRect.anchoredPosition = new Vector2(LayersRect.anchoredPosition.x, TimelineContent.anchoredPosition.y);
lastViewportSize = TimelineScroll.viewport.rect.size;
} }
public static float GetScaleModifier() public static float GetScaleModifier()

View file

@ -146,7 +146,7 @@ namespace HeavenStudio.Editor.Track
public void SortMarkers() public void SortMarkers()
{ {
Debug.Log("Sorted timeline blocks."); // Debug.Log("Sorted timeline blocks.");
var sortedBlocks = EntityMarkers.Values.OrderByDescending(c => c.entity.length).ToList(); var sortedBlocks = EntityMarkers.Values.OrderByDescending(c => c.entity.length).ToList();

File diff suppressed because one or more lines are too long

View file

@ -134,7 +134,7 @@ PlayerSettings:
16:10: 1 16:10: 1
16:9: 1 16:9: 1
Others: 1 Others: 1
bundleVersion: 0.0.996 bundleVersion: 0.0.997
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: 996 Standalone: 997
iPhone: 0 iPhone: 0
tvOS: 0 tvOS: 0
overrideDefaultApplicationIdentifier: 0 overrideDefaultApplicationIdentifier: 0
AndroidBundleVersionCode: 996 AndroidBundleVersionCode: 997
AndroidMinSdkVersion: 22 AndroidMinSdkVersion: 22
AndroidTargetSdkVersion: 0 AndroidTargetSdkVersion: 0
AndroidPreferredInstallLocation: 1 AndroidPreferredInstallLocation: 1