Interface IUnlimitedScroller
Namespace: UnlimitedScrollUI
Assembly: cs.temp.dll.dll
Syntax
public interface IUnlimitedScroller
Properties
CellPerRow
The calculated real number of cells per row or columns count.
Declaration
int CellPerRow { get; }
Property Value
Type | Description |
---|---|
Int32 |
ContentHeight
The height of the content.
Declaration
float ContentHeight { get; }
Property Value
Type | Description |
---|---|
Single |
ContentWidth
The width of the content.
Declaration
float ContentWidth { get; }
Property Value
Type | Description |
---|---|
Single |
FirstCol
The first visible column.
Declaration
int FirstCol { get; }
Property Value
Type | Description |
---|---|
Int32 |
FirstRow
The first visible row.
Declaration
int FirstRow { get; }
Property Value
Type | Description |
---|---|
Int32 |
Generated
Whether this scroller has initialized and generate cells.
Declaration
bool Generated { get; }
Property Value
Type | Description |
---|---|
Boolean |
Initialized
Whether this scroller has initialized.
Declaration
bool Initialized { get; }
Property Value
Type | Description |
---|---|
Boolean |
LastCol
The last visible column.
Declaration
int LastCol { get; }
Property Value
Type | Description |
---|---|
Int32 |
LastRow
The last visible row.
Declaration
int LastRow { get; }
Property Value
Type | Description |
---|---|
Int32 |
RowCount
Total row count.
Declaration
int RowCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
ViewportHeight
The height of the viewport.
Declaration
float ViewportHeight { get; }
Property Value
Type | Description |
---|---|
Single |
ViewportWidth
The width of the viewport.
Declaration
float ViewportWidth { get; }
Property Value
Type | Description |
---|---|
Single |
Methods
Clear()
Clear all cells including cache.
Declaration
void Clear()
ClearCache()
Clear all cached cells. This will not change the cache size.
Declaration
void ClearCache()
Generate(GameObject, Int32, Action<Int32, ICell>)
Call this function to initialize and generate cells.
Declaration
void Generate(GameObject newCell, int newTotalCount, Action<int, ICell> onGenerate)
Parameters
Type | Name | Description |
---|---|---|
GameObject | newCell | The cell game object. |
Int32 | newTotalCount | The total cell count you want to generate. |
Action<Int32, ICell> | onGenerate | The delegate when the cell is generated, you can initialize cell data here. |
JumpTo(UInt32, JumpToMethod)
Call this function to jump to cell at index.
Declaration
void JumpTo(uint index, JumpToMethod method)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | index | The index of the cell. |
JumpToMethod | method | The jump method. |
SetCacheSize(UInt32)
Set a new caching size. If smaller than current cache size, cache will be trimmed to the new size
Declaration
void SetCacheSize(uint newSize)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | newSize | New cache size. |