Version 3.3.1.2

GUIPagingHelper class

Namespace: Sirenix.Utilities.Editor
Assembly: Sirenix.Utilities.Editor
public class GUIPagingHelper
A helper class to control paging of n number of elements in various situations.
Inheritance
  • System.Object
  • GUIPagingHelper

Constructors

GUIPagingHelper()
Initializes a new instance of the GUIPagingHelper class.
public GUIPagingHelper()

Fields

IsExpanded
Disables the paging, and show all elements.
public bool IsExpanded

Properties

CurrentPage
Gets or sets the current page.
public int CurrentPage { get; set; }
ElementCount
Gets the total number of elements. Use Update(Int32) to change the value.
public int ElementCount { get; }
EndIndex
Gets the end index.
public int EndIndex { get; }
IsEnabled
Gets or sets a value indicating whether this instance is enabled.
public bool IsEnabled { get; set; }
IsOnFirstPage
Gets a value indicating whether this instance is on the frist page.
public bool IsOnFirstPage { get; }
IsOnLastPage
Gets a value indicating whether this instance is on the last page.
public bool IsOnLastPage { get; }
NumberOfItemsPerPage
Gets or sets the number of items per page.
public int NumberOfItemsPerPage { get; set; }
PageCount
Gets or sets the page count.
public int PageCount { get; }
StartIndex
Gets the start index.
public int StartIndex { get; }

Methods

DrawToolbarPagingButtons(ref Rect, Boolean, Boolean, Int32)
Draws right-aligned toolbar paging buttons.
public void DrawToolbarPagingButtons(ref Rect toolbarRect, bool showPaging, bool showItemCount, int btnWidth = 23)
Parameters
UnityEngine.Rect toolbarRect

System.Boolean showPaging

System.Boolean showItemCount

System.Int32 btnWidth

Update(Int32)
Updates all values based on elementCount and .
public void Update(int elementCount)
Parameters
System.Int32 elementCount

The total number of elements to apply paging for.