Commit 23cea112 authored by 神楽坂玲奈's avatar 神楽坂玲奈

scroll

parent 28cd6ccc
......@@ -320,31 +320,31 @@ public class UIScrollView : MonoBehaviour
mPanel.clipping = UIDrawCall.Clipping.ConstrainButDontClip;
// Auto-upgrade
if (movement != Movement.Custom && scale.sqrMagnitude > 0.001f)
{
if (scale.x == 1f && scale.y == 0f)
{
movement = Movement.Horizontal;
}
else if (scale.x == 0f && scale.y == 1f)
{
movement = Movement.Vertical;
}
else if (scale.x == 1f && scale.y == 1f)
{
movement = Movement.Unrestricted;
}
else
{
movement = Movement.Custom;
customMovement.x = scale.x;
customMovement.y = scale.y;
}
scale = Vector3.zero;
#if UNITY_EDITOR
NGUITools.SetDirty(this);
#endif
}
// if (movement != Movement.Custom && scale.sqrMagnitude > 0.001f)
// {
// if (scale.x == 1f && scale.y == 0f)
// {
// movement = Movement.Horizontal;
// }
// else if (scale.x == 0f && scale.y == 1f)
// {
// movement = Movement.Vertical;
// }
// else if (scale.x == 1f && scale.y == 1f)
// {
// movement = Movement.Unrestricted;
// }
// else
// {
// movement = Movement.Custom;
// customMovement.x = scale.x;
// customMovement.y = scale.y;
// }
// scale = Vector3.zero;
// #if UNITY_EDITOR
// NGUITools.SetDirty(this);
// #endif
// }
// Auto-upgrade
if (contentPivot == UIWidget.Pivot.TopLeft && relativePositionOnReset != Vector2.zero)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment