summaryrefslogtreecommitdiff
path: root/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/UIControls
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/UIControls')
-rw-r--r--Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/UIControls/ScrollRect.cs11
-rw-r--r--Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/UIControls/Scrollbar.cs7
-rw-r--r--Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/UIControls/Slider.cs8
-rw-r--r--Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/UIControls/Toggle.cs2
4 files changed, 23 insertions, 5 deletions
diff --git a/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/UIControls/ScrollRect.cs b/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/UIControls/ScrollRect.cs
index f41fea8..a44bc5c 100644
--- a/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/UIControls/ScrollRect.cs
+++ b/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/UIControls/ScrollRect.cs
@@ -9,7 +9,16 @@ namespace UnityEngine.UI
[ExecuteInEditMode]
[DisallowMultipleComponent]
[RequireComponent(typeof(RectTransform))]
- public class ScrollRect : UIBehaviour, IInitializePotentialDragHandler, IBeginDragHandler, IEndDragHandler, IDragHandler, IScrollHandler, ICanvasElement, ILayoutElement, ILayoutGroup
+ public class ScrollRect
+ : UIBehaviour
+ , IInitializePotentialDragHandler
+ , IBeginDragHandler
+ , IEndDragHandler
+ , IDragHandler
+ , IScrollHandler
+ , ICanvasElement
+ , ILayoutElement
+ , ILayoutGroup
{
public enum MovementType
{
diff --git a/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/UIControls/Scrollbar.cs b/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/UIControls/Scrollbar.cs
index cbb1605..c280305 100644
--- a/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/UIControls/Scrollbar.cs
+++ b/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/UIControls/Scrollbar.cs
@@ -7,7 +7,12 @@ namespace UnityEngine.UI
{
[AddComponentMenu("UI/Scrollbar", 34)]
[RequireComponent(typeof(RectTransform))]
- public class Scrollbar : Selectable, IBeginDragHandler, IDragHandler, IInitializePotentialDragHandler, ICanvasElement
+ public class Scrollbar
+ : Selectable
+ , IBeginDragHandler
+ , IDragHandler
+ , IInitializePotentialDragHandler
+ , ICanvasElement
{
public enum Direction
{
diff --git a/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/UIControls/Slider.cs b/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/UIControls/Slider.cs
index 4e80fb3..4aad4e8 100644
--- a/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/UIControls/Slider.cs
+++ b/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/UIControls/Slider.cs
@@ -9,7 +9,7 @@ namespace UnityEngine.UI
public class Slider
: Selectable
, IDragHandler
- , IInitializePotentialDragHandler
+ , IInitializePotentialDragHandler // 拖拽之前
, ICanvasElement // 编辑器下才会用到
{
public enum Direction
@@ -100,7 +100,7 @@ namespace UnityEngine.UI
private DrivenRectTransformTracker m_Tracker;
// Size of each step.
- float stepSize { get { return wholeNumbers ? 1 : (maxValue - minValue) * 0.1f; } }
+ float stepSize { get { return wholeNumbers ? 1 : (maxValue - minValue) * 0.1f; } } // 1/10十分之一
protected Slider()
{}
@@ -268,6 +268,8 @@ namespace UnityEngine.UI
// Force-update the slider. Useful if you've changed the properties and want it to update visually.
private void UpdateVisuals()
{
+ LogHelper.Log("UpdateVisuals");
+
#if UNITY_EDITOR
if (!Application.isPlaying)
UpdateCachedReferences();
@@ -352,6 +354,7 @@ namespace UnityEngine.UI
public virtual void OnDrag(PointerEventData eventData)
{
+ LogHelper.Log("OnDrag() " + gameObject.name);
if (!MayDrag(eventData))
return;
UpdateDrag(eventData, eventData.pressEventCamera);
@@ -422,6 +425,7 @@ namespace UnityEngine.UI
return base.FindSelectableOnDown();
}
+ //
public virtual void OnInitializePotentialDrag(PointerEventData eventData)
{
eventData.useDragThreshold = false;
diff --git a/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/UIControls/Toggle.cs b/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/UIControls/Toggle.cs
index 8dc4c82..f2dc8b9 100644
--- a/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/UIControls/Toggle.cs
+++ b/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/UIControls/Toggle.cs
@@ -89,7 +89,7 @@ namespace UnityEngine.UI
onValueChanged.Invoke(m_IsOn);
#endif
}
-
+
public virtual void LayoutComplete()
{}