Resolution for #80 issue where onPageChanged is fired multiple times for Next/Previous.
--HG-- branch : develop_5.3pull/413/head
parent
cd3f79ef7c
commit
38d98a0fad
|
@ -83,7 +83,7 @@ namespace UnityEngine.UI.Extensions
|
||||||
_previousPage = _currentPage;
|
_previousPage = _currentPage;
|
||||||
_currentPage = value;
|
_currentPage = value;
|
||||||
if(MaskArea) UpdateVisible();
|
if(MaskArea) UpdateVisible();
|
||||||
ScreenChange();
|
if(!_lerp) ScreenChange();
|
||||||
ChangeBulletsInfo(_currentPage);
|
ChangeBulletsInfo(_currentPage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -240,6 +240,7 @@ namespace UnityEngine.UI.Extensions
|
||||||
_lerp = true;
|
_lerp = true;
|
||||||
CurrentPage = _currentPage + 1;
|
CurrentPage = _currentPage + 1;
|
||||||
GetPositionforPage(_currentPage, ref _lerp_target);
|
GetPositionforPage(_currentPage, ref _lerp_target);
|
||||||
|
ScreenChange();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -253,6 +254,7 @@ namespace UnityEngine.UI.Extensions
|
||||||
_lerp = true;
|
_lerp = true;
|
||||||
CurrentPage = _currentPage - 1;
|
CurrentPage = _currentPage - 1;
|
||||||
GetPositionforPage(_currentPage, ref _lerp_target);
|
GetPositionforPage(_currentPage, ref _lerp_target);
|
||||||
|
ScreenChange();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue