Added CurrentPageObject functions to return the Transform of the currently selected page.

pull/413/head
Simon Jackson 2017-07-09 10:17:32 +01:00
parent 845f5d5700
commit 8c2d10dccc
1 changed files with 19 additions and 1 deletions

View File

@ -476,7 +476,25 @@ namespace UnityEngine.UI.Extensions
_moveStarted = false; _moveStarted = false;
} }
#region Interfaces /// <summary>
/// Returns the Transform of the Currentpage
/// </summary>
/// <returns>Currently selected Page Transform</returns>
public Transform CurrentPageObject()
{
return _screensContainer.GetChild(CurrentPage);
}
/// <summary>
/// Returns the Transform of the Currentpage in an out param for performance
/// </summary>
/// <param name="returnObject">Currently selected Page Transform</param>
public void CurrentPageObject(out Transform returnObject)
{
returnObject = _screensContainer.GetChild(CurrentPage);
}
#region Drag Interfaces
/// <summary> /// <summary>
/// Touch screen to start swiping /// Touch screen to start swiping
/// </summary> /// </summary>