Guest User

ScrollFixes

a guest
Nov 18th, 2021
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 4.26 KB | None | 0 0
  1. 1,6d0
  2. < // Decompiled with JetBrains decompiler
  3. < // Type: UnityEngine.UIElements.ScrollView
  4. < // Assembly: UnityEngine.UIElementsModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
  5. < // MVID: 5A4BA647-01D0-4AA8-BC09-D8E52AC02995
  6. < // Assembly location: /Applications/Unity/Hub/Editor/2021.2.0f1/Unity.app/Contents/Managed/UnityEngine/UnityEngine.UIElementsModule.dll
  7. <
  8. 19c13
  9. <   public class ScrollView : VisualElement
  10. ---
  11. >   public class ConfigurableScrollView : VisualElement
  12. 25c19
  13. <     private float m_SingleLineHeight = UIElementsUtility.singleLineHeight;
  14. ---
  15. >     private float m_SingleLineHeight = 18f;
  16. 32c26
  17. <     private float m_ScrollDecelerationRate = ScrollView.k_DefaultScrollDecelerationRate;
  18. ---
  19. >     private float m_ScrollDecelerationRate = ConfigurableScrollView.k_DefaultScrollDecelerationRate;
  20. 34c28
  21. <     private float m_Elasticity = ScrollView.k_DefaultElasticity;
  22. ---
  23. >     private float m_Elasticity = ConfigurableScrollView.k_DefaultElasticity;
  24. 358c352
  25. <     private void UpdateContentViewTransform()
  26. ---
  27. >     public void UpdateContentViewTransform()
  28. 477c471
  29. <     public ScrollView()
  30. ---
  31. >     public ConfigurableScrollView()
  32. 489c483
  33. <     public ScrollView(ScrollViewMode scrollViewMode)
  34. ---
  35. >     public ConfigurableScrollView(ScrollViewMode scrollViewMode)
  36. 842,843c836,849
  37. <           vector2_1.x = ScrollView.ComputeElasticOffset(vector2_2.x, this.m_StartPosition.x, this.m_LowBounds.x, this.m_LowBounds.x - this.contentViewport.resolvedStyle.width, this.m_HighBounds.x, this.m_HighBounds.x + this.contentViewport.resolvedStyle.width);
  38. <           vector2_1.y = ScrollView.ComputeElasticOffset(vector2_2.y, this.m_StartPosition.y, this.m_LowBounds.y, this.m_LowBounds.y - this.contentViewport.resolvedStyle.height, this.m_HighBounds.y, this.m_HighBounds.y + this.contentViewport.resolvedStyle.height);
  39. ---
  40. >           vector2_1 = Vector2.Min(Vector2.Max(this.m_StartPosition - (new Vector2(evt.position.x, evt.position.y) - this.m_PointerStartPosition), this.m_LowBounds), this.m_HighBounds);
  41. >           if (this.mode == ScrollViewMode.Horizontal || this.mode == ScrollViewMode.VerticalAndHorizontal)
  42. >           {
  43. >             vector2_1.x = ConfigurableScrollView.ComputeElasticOffset(vector2_2.x, this.m_StartPosition.x,
  44. >               this.m_LowBounds.x, this.m_LowBounds.x - this.contentViewport.resolvedStyle.width, this.m_HighBounds.x,
  45. >               this.m_HighBounds.x + this.contentViewport.resolvedStyle.width);
  46. >           }
  47. >
  48. >           if (this.mode == ScrollViewMode.Vertical || this.mode == ScrollViewMode.VerticalAndHorizontal)
  49. >           {
  50. >             vector2_1.y = ConfigurableScrollView.ComputeElasticOffset(vector2_2.y, this.m_StartPosition.y,
  51. >               this.m_LowBounds.y, this.m_LowBounds.y - this.contentViewport.resolvedStyle.height, this.m_HighBounds.y,
  52. >               this.m_HighBounds.y + this.contentViewport.resolvedStyle.height);
  53. >           }
  54. 895c901
  55. <           this.m_PostPointerUpAnimation = this.schedule.Execute(new Action(this.PostPointerUpAnimation)).Every(30L);
  56. ---
  57. >           this.m_PostPointerUpAnimation = this.schedule.Execute(new Action(this.PostPointerUpAnimation)).Every(16L);
  58. 968c974
  59. <       if (!this.needsVertical || (double) this.scrollableHeight <= 0.0)
  60. ---
  61. >       /*if (!this.needsVertical || (double) this.scrollableHeight <= 0.0)
  62. 972c978
  63. <       this.horizontalScroller.value = 0.0f;
  64. ---
  65. >       this.horizontalScroller.value = 0.0f;*/
  66. 1050c1056
  67. <     public new class UxmlFactory : UnityEngine.UIElements.UxmlFactory<ScrollView, ScrollView.UxmlTraits>
  68. ---
  69. >     public new class UxmlFactory : UnityEngine.UIElements.UxmlFactory<ConfigurableScrollView, ConfigurableScrollView.UxmlTraits>
  70. 1085c1091
  71. <         ScrollView scrollView = (ScrollView) ve;
  72. ---
  73. >         ConfigurableScrollView scrollView = (ConfigurableScrollView) ve;
  74. 1136c1142
  75. <         attributeDescription9.defaultValue = ScrollView.k_DefaultScrollDecelerationRate;
  76. ---
  77. >         attributeDescription9.defaultValue = ConfigurableScrollView.k_DefaultScrollDecelerationRate;
  78. 1140c1146
  79. <         attributeDescription10.defaultValue = ScrollView.k_DefaultElasticity;
  80. ---
  81. >         attributeDescription10.defaultValue = ConfigurableScrollView.k_DefaultElasticity;
  82. 1143d1148
  83. <         base.\u002Ector();
Add Comment
Please, Sign In to add comment