event scroll fixes

This commit is contained in:
minenice55 2022-07-01 22:29:16 -04:00
parent 94a1e225e9
commit 58dd43e67b
2 changed files with 17 additions and 16 deletions

View File

@ -1798,7 +1798,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0.5} m_AnchorMin: {x: 1, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5} m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: -94.99994, y: 0} m_AnchoredPosition: {x: -94.99992, y: 0}
m_SizeDelta: {x: 39.99997, y: 40} m_SizeDelta: {x: 39.99997, y: 40}
m_Pivot: {x: 1, y: 0.5} m_Pivot: {x: 1, y: 0.5}
--- !u!114 &121871281 --- !u!114 &121871281
@ -5728,17 +5728,17 @@ RectTransform:
m_GameObject: {fileID: 411779173} m_GameObject: {fileID: 411779173}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 80.17311, y: 80.17311, z: 1} m_LocalScale: {x: 0.8017311, y: 80.17311, z: 1}
m_Children: m_Children:
- {fileID: 1310571274} - {fileID: 1310571274}
- {fileID: 1207455550} - {fileID: 1207455550}
m_Father: {fileID: 2066632680} m_Father: {fileID: 2066632680}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0.5, y: 0}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 1, y: 1}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &411779175 --- !u!114 &411779175
MonoBehaviour: MonoBehaviour:
@ -8539,7 +8539,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 704039020} m_HandleRect: {fileID: 704039020}
m_Direction: 0 m_Direction: 0
m_Value: 0 m_Value: 0
m_Size: 0.032871284 m_Size: 0.03287128
m_NumberOfSteps: 0 m_NumberOfSteps: 0
m_OnValueChanged: m_OnValueChanged:
m_PersistentCalls: m_PersistentCalls:
@ -12023,8 +12023,8 @@ 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.14881732 m_Value: 0
m_Size: 0.52981937 m_Size: 0.9974449
m_NumberOfSteps: 0 m_NumberOfSteps: 0
m_OnValueChanged: m_OnValueChanged:
m_PersistentCalls: m_PersistentCalls:
@ -14353,7 +14353,7 @@ MonoBehaviour:
m_OnCullStateChanged: m_OnCullStateChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_text: Enter BPM m_text: Enter Offset
m_isRightToLeft: 0 m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 78e7291cdeccdfc4fa61249845605144, type: 2} m_fontAsset: {fileID: 11400000, guid: 78e7291cdeccdfc4fa61249845605144, type: 2}
m_sharedMaterial: {fileID: 5250768452915780979, guid: 78e7291cdeccdfc4fa61249845605144, type: 2} m_sharedMaterial: {fileID: 5250768452915780979, guid: 78e7291cdeccdfc4fa61249845605144, type: 2}
@ -15065,7 +15065,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: 326.57358} m_AnchoredPosition: {x: 0, y: 260.99835}
m_SizeDelta: {x: 0, y: 491} m_SizeDelta: {x: 0, y: 491}
m_Pivot: {x: 0.5, y: 1} m_Pivot: {x: 0.5, y: 1}
--- !u!114 &1154875944 --- !u!114 &1154875944
@ -20487,7 +20487,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: 111.50012, y: -14.244171} m_AnchoredPosition: {x: 111.50012, y: -14.244141}
m_SizeDelta: {x: 223, y: -138.84} m_SizeDelta: {x: 223, y: -138.84}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1671351976 --- !u!114 &1671351976
@ -22107,7 +22107,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: 0, y: 0.5} m_AnchorMax: {x: 0, y: 0.5}
m_AnchoredPosition: {x: 94.99994, y: 0} m_AnchoredPosition: {x: 94.99992, y: 0}
m_SizeDelta: {x: 39.999985, y: 40} m_SizeDelta: {x: 39.999985, y: 40}
m_Pivot: {x: 0, y: 0.5} m_Pivot: {x: 0, y: 0.5}
--- !u!114 &1783491359 --- !u!114 &1783491359
@ -24172,7 +24172,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: 1} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: -14.242828} m_AnchoredPosition: {x: 0, y: -14.242798}
m_SizeDelta: {x: 0, y: -138.84} m_SizeDelta: {x: 0, y: -138.84}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1980243267 --- !u!114 &1980243267
@ -25575,7 +25575,7 @@ RectTransform:
m_GameObject: {fileID: 2066632679} m_GameObject: {fileID: 2066632679}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.01, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 411779174} - {fileID: 411779174}
m_Father: {fileID: 1852819573} m_Father: {fileID: 1852819573}

View File

@ -20,6 +20,7 @@ namespace HeavenStudio.Editor
public GameObject GameEventSelector; public GameObject GameEventSelector;
public GameObject EventRef; public GameObject EventRef;
public GameObject CurrentSelected; public GameObject CurrentSelected;
public RectTransform GameEventSelectorCanScroll;
private RectTransform GameEventSelectorRect; private RectTransform GameEventSelectorRect;
private RectTransform eventsParent; private RectTransform eventsParent;
@ -61,7 +62,7 @@ namespace HeavenStudio.Editor
} }
} }
if (RectTransformUtility.RectangleContainsScreenPoint(eventsParent, Input.mousePosition, Editor.instance.EditorCamera) && Input.mouseScrollDelta.y != 0) if (RectTransformUtility.RectangleContainsScreenPoint(GameEventSelectorCanScroll, Input.mousePosition, Editor.instance.EditorCamera) && Input.mouseScrollDelta.y != 0)
{ {
UpdateIndex(currentEventIndex - Mathf.RoundToInt(Input.mouseScrollDelta.y)); UpdateIndex(currentEventIndex - Mathf.RoundToInt(Input.mouseScrollDelta.y));
} }