Documentation

UI::ListClipper

Class

Helper class to manually clip large lists of items. To use this, create an instance on the stack. Call Begin, or pass the the total item count the constructor which will call Begin for you. Make a while loop with the condition clipper.Step(). Inside of the loop, make a for loop with int i = clipper.DisplayStart; i < clipper.DisplayEnd; i++. Inside of the for loop, put whatever UI elements you need for the item at index i. Remember that all UI items in the list must be the same height for ListClipper to work.

Methods

Call until it returns false. The DisplayStart/DisplayEnd fields will be set and you can process/draw those items.

Returns bool

Automatically called on the last call of Step() that returns false.