From 70c5a8706a06d303ad9d51b000f13a3bb5e7c785 Mon Sep 17 00:00:00 2001 From: Braedon Date: Mon, 17 Jan 2022 15:08:32 -0500 Subject: [PATCH] Some resizable fixes --- .../Resources/Sprites/Editor/eventObjs.meta | 8 + .../Editor/eventObjs/resizableArrow.png | Bin 0 -> 6232 bytes .../Editor/eventObjs/resizableArrow.png.meta | 96 ++++++ Assets/Scenes/Editor.unity | 280 +++++++++++++++++- Assets/Scripts/LevelEditor/Timeline.cs | 2 +- .../Scripts/LevelEditor/TimelineEventObj.cs | 34 ++- 6 files changed, 395 insertions(+), 25 deletions(-) create mode 100644 Assets/Resources/Sprites/Editor/eventObjs.meta create mode 100644 Assets/Resources/Sprites/Editor/eventObjs/resizableArrow.png create mode 100644 Assets/Resources/Sprites/Editor/eventObjs/resizableArrow.png.meta diff --git a/Assets/Resources/Sprites/Editor/eventObjs.meta b/Assets/Resources/Sprites/Editor/eventObjs.meta new file mode 100644 index 00000000..126e8673 --- /dev/null +++ b/Assets/Resources/Sprites/Editor/eventObjs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1977da4a12a8c4c4daf31086e4367de5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/Editor/eventObjs/resizableArrow.png b/Assets/Resources/Sprites/Editor/eventObjs/resizableArrow.png new file mode 100644 index 0000000000000000000000000000000000000000..d3f0c582177b433a77e21bdfd32754abe6b6caf0 GIT binary patch literal 6232 zcmb_h2~?8ny2d#rDJv-ligcSfAWo#BSePbiYAF&9sRUR!l3;47K~7~(f-FSLP zkRFW@a)7B95yS@EFqp;m2sVu#z~rJ2Fb}eV32M_#H`UNA20?8f&Qafyy_0!}MLHVF zbUo@srXLNUn=#b3TcRx@@IXKilS@NK1O*0j@DT*H?{e|rdYOz>Lw{%C1`yPU%L>s{ z$35tsA)!pPiJk$5uCK3;HZjvUY1BZ5E8~Er~y;|^dX4-Q*1EjN1Q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Sea>YzS&U7gPoaWxB`I?AsC{KUNR-P_Q1%&Bif`^4B z1KgYLP)ES^bNKewsRW<&8}SiD`FVg46(g3*Crr<0vQf1OOO2_8_Kk;YFCe7!B)64J zEEWh@Bl{Ki`=G{FlwUwf9Fy37Wn!_1omnVHr9PdL5Ge{!@7-peS}_mO!iLrgo=zSl zv)}9|O(X4pr&7fiU^56`W_v)YD02G#gVyfzaQ=WqnqPAfcBhU`-Wvb>o6^X1OKf&q z2Y(audN%%%LiU!UuqW#qEqdm>qV{b=W>a1s79A4Nl`6+-_xx_E(VL@6Ty*K2-CTK< zFwdw5Kre#zR^nCkPIx_5he4#f+9n+p?22DSb zu79XvyPrWT_0in^q1Yz|<*~CyXnfL$|AqH__MLepops1kqgTIP5_$HL_{SH_l?@S9 zshqe%+VIY!Cn9Xpwof<3D<^>`9falL7;Njjo?3VrJeY903wtRM;QY?0hG*_?SI~br zt}s_mYCQd!ZEo^3(%%=E9om#Ni@B|$`DtmO_q+{;4j#MEH7#=+a&8VOP;Wjn^@qb9 z+?1rA$w#HXyu?`C2R+(+ifjRBOR7SN&M!~y#1h@frg>}ZwG-5J?d}MLzbLk~o+Yn@ jJGdC={yz}DZpwQ;cjCpS!{F}$7|hPb$-2_Y_r!kz{w}iy literal 0 HcmV?d00001 diff --git a/Assets/Resources/Sprites/Editor/eventObjs/resizableArrow.png.meta b/Assets/Resources/Sprites/Editor/eventObjs/resizableArrow.png.meta new file mode 100644 index 00000000..9d7bd34f --- /dev/null +++ b/Assets/Resources/Sprites/Editor/eventObjs/resizableArrow.png.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: 2442a7e8f9897914e98bc2b963f4186f +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Editor.unity b/Assets/Scenes/Editor.unity index f4c8c205..b34e3b21 100644 --- a/Assets/Scenes/Editor.unity +++ b/Assets/Scenes/Editor.unity @@ -740,6 +740,81 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 163092848} m_CullTransparentMesh: 1 +--- !u!1 &163256865 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 163256866} + - component: {fileID: 163256868} + - component: {fileID: 163256867} + m_Layer: 5 + m_Name: ResizeLeft + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &163256866 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 163256865} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 880758902} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0.5, y: 0} + m_Pivot: {x: 0, y: 0.5} +--- !u!114 &163256867 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 163256865} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.6156863} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 2442a7e8f9897914e98bc2b963f4186f, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &163256868 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 163256865} + m_CullTransparentMesh: 1 --- !u!1 &184364175 GameObject: m_ObjectHideFlags: 0 @@ -771,7 +846,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 798021449} - m_RootOrder: 6 + m_RootOrder: 7 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 0} m_AnchorMax: {x: 1, y: 1} @@ -1393,7 +1468,7 @@ RectTransform: m_LocalScale: {x: 0.01111111, y: 1, z: 1} m_Children: [] m_Father: {fileID: 798021449} - m_RootOrder: 2 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0.5} m_AnchorMax: {x: 1, y: 0.5} @@ -4078,6 +4153,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 660967737} + - {fileID: 880758902} - {fileID: 820032005} - {fileID: 258006092} - {fileID: 2127582757} @@ -4181,7 +4257,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 798021449} - m_RootOrder: 1 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0.5} m_AnchorMax: {x: 0, y: 0.5} @@ -4301,6 +4377,44 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 841081095} m_CullTransparentMesh: 1 +--- !u!1 &880758901 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 880758902} + m_Layer: 5 + m_Name: ResizeGraphic + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &880758902 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 880758901} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 163256866} + - {fileID: 1701256165} + - {fileID: 1799484112} + m_Father: {fileID: 798021449} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &903653564 GameObject: m_ObjectHideFlags: 0 @@ -6022,7 +6136,7 @@ RectTransform: - {fileID: 1237250188} - {fileID: 1837496588} m_Father: {fileID: 798021449} - m_RootOrder: 4 + m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} @@ -6910,8 +7024,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f86858990a87c764892672104bdaef1f, type: 3} m_Name: m_EditorClassIdentifier: - level: {fileID: 4900000, guid: 4b7512c586e16a847a5b8490bf35e852, type: 3} - music: {fileID: 8300000, guid: 92cf585c80f8fb843964e525aef1406c, type: 3} + level: {fileID: 4900000, guid: ac276edd56ab99249a2a413e6ac2783d, type: 3} + music: {fileID: 8300000, guid: d6aa7955da64b284589e923dc18c67fb, type: 3} debugUI: 0 playOnStart: 0 editor: 1 @@ -7919,6 +8033,81 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1683100748} m_CullTransparentMesh: 1 +--- !u!1 &1701256164 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1701256165} + - component: {fileID: 1701256167} + - component: {fileID: 1701256166} + m_Layer: 5 + m_Name: ResizeRight + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1701256165 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1701256164} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: -1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 880758902} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0.000019073486} + m_SizeDelta: {x: 0.5, y: 0.0000019073486} + m_Pivot: {x: 0, y: 0.5} +--- !u!114 &1701256166 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1701256164} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.6156863} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 2442a7e8f9897914e98bc2b963f4186f, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1701256167 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1701256164} + m_CullTransparentMesh: 1 --- !u!1 &1709317942 GameObject: m_ObjectHideFlags: 0 @@ -8425,6 +8614,81 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 1280, y: 720} m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1799484111 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1799484112} + - component: {fileID: 1799484114} + - component: {fileID: 1799484113} + m_Layer: 5 + m_Name: ResizeLine + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1799484112 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1799484111} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: -1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 880758902} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 1, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -0.264, y: 5} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1799484113 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1799484111} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.6156863} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1799484114 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1799484111} + m_CullTransparentMesh: 1 --- !u!1 &1837496587 GameObject: m_ObjectHideFlags: 0 @@ -9378,7 +9642,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 798021449} - m_RootOrder: 5 + m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1} @@ -9629,7 +9893,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 798021449} - m_RootOrder: 3 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} diff --git a/Assets/Scripts/LevelEditor/Timeline.cs b/Assets/Scripts/LevelEditor/Timeline.cs index 9bf6df0b..5bf948a2 100644 --- a/Assets/Scripts/LevelEditor/Timeline.cs +++ b/Assets/Scripts/LevelEditor/Timeline.cs @@ -297,7 +297,7 @@ namespace RhythmHeavenMania.Editor { GameObject g = Instantiate(TimelineEventObjRef.gameObject, TimelineEventObjRef.parent); g.transform.localPosition = pos; - g.transform.GetChild(2).GetComponent().text = eventName.Split('/')[1]; + g.transform.GetChild(3).GetComponent().text = eventName.Split('/')[1]; TimelineEventObj eventObj = g.GetComponent(); diff --git a/Assets/Scripts/LevelEditor/TimelineEventObj.cs b/Assets/Scripts/LevelEditor/TimelineEventObj.cs index 02a39631..de49c047 100644 --- a/Assets/Scripts/LevelEditor/TimelineEventObj.cs +++ b/Assets/Scripts/LevelEditor/TimelineEventObj.cs @@ -41,8 +41,9 @@ namespace RhythmHeavenMania.Editor if (!resizable) { - Destroy(transform.GetChild(5).gameObject); Destroy(transform.GetChild(6).gameObject); + Destroy(transform.GetChild(7).gameObject); + Destroy(transform.GetChild(1).gameObject); } } @@ -54,7 +55,8 @@ namespace RhythmHeavenMania.Editor #region Optimizations - bool visible = GetComponent().IsVisibleFrom(Camera.main); + // problem with long objects but im lazy right now + bool visible = rectTransform.IsVisibleFrom(Camera.main); if (visible != lastVisible) { @@ -164,23 +166,18 @@ namespace RhythmHeavenMania.Editor public void DragEnter() { - if (selected) - Cursor.SetCursor(Resources.Load("Cursors/horizontal_resize"), new Vector2(8, 8), CursorMode.Auto); + Cursor.SetCursor(Resources.Load("Cursors/horizontal_resize"), new Vector2(8, 8), CursorMode.Auto); } public void DragExit() { - if (!resizing) - Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto); + Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto); } public void OnLeftDown() { - if (selected) - { - SetPivot(new Vector2(1, rectTransform.pivot.y)); - resizing = true; - } + SetPivot(new Vector2(1, rectTransform.pivot.y)); + resizing = true; } public void DragLeft() @@ -207,11 +204,8 @@ namespace RhythmHeavenMania.Editor public void OnRightDown() { - if (selected) - { - SetPivot(new Vector2(0, rectTransform.pivot.y)); - resizing = true; - } + SetPivot(new Vector2(0, rectTransform.pivot.y)); + resizing = true; } public void DragRight() @@ -352,6 +346,14 @@ namespace RhythmHeavenMania.Editor // c = new Color(c.r, c.g, c.b, 0.85f); transform.GetChild(0).GetComponent().color = c; + + if (resizable) + { + c = new Color(0, 0, 0, 0.35f); + transform.GetChild(1).GetChild(0).GetComponent().color = c; + transform.GetChild(1).GetChild(1).GetComponent().color = c; + transform.GetChild(1).GetChild(2).GetComponent().color = c; + } } public int GetTrack()