Added argument to the UpdateLayout method for the HSS/VSS to move to a new starting page
Resolves: https://github.com/Unity-UI-Extensions/com.unity.uiextensions/issues/451pull/460/head
parent
9c7a59c9f2
commit
a47d694796
|
@ -223,12 +223,21 @@ namespace UnityEngine.UI.Extensions
|
|||
/// <summary>
|
||||
/// used for changing / updating between screen resolutions
|
||||
/// </summary>
|
||||
public void UpdateLayout()
|
||||
public void UpdateLayout(bool resetPositionToStart = false)
|
||||
{
|
||||
_lerp = false;
|
||||
DistributePages();
|
||||
|
||||
if (resetPositionToStart)
|
||||
{
|
||||
_currentPage = StartingScreen;
|
||||
}
|
||||
|
||||
if (MaskArea)
|
||||
{
|
||||
UpdateVisible();
|
||||
}
|
||||
|
||||
SetScrollContainerPosition();
|
||||
OnCurrentScreenChange(_currentPage);
|
||||
}
|
||||
|
|
|
@ -218,11 +218,21 @@ namespace UnityEngine.UI.Extensions
|
|||
/// <summary>
|
||||
/// used for changing / updating between screen resolutions
|
||||
/// </summary>
|
||||
public void UpdateLayout()
|
||||
public void UpdateLayout(bool resetPositionToStart = false)
|
||||
{
|
||||
_lerp = false;
|
||||
DistributePages();
|
||||
if (MaskArea) UpdateVisible();
|
||||
|
||||
if (resetPositionToStart)
|
||||
{
|
||||
_currentPage = StartingScreen;
|
||||
}
|
||||
|
||||
if (MaskArea)
|
||||
{
|
||||
UpdateVisible();
|
||||
}
|
||||
|
||||
SetScrollContainerPosition();
|
||||
OnCurrentScreenChange(_currentPage);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue