Class NativeListItem<T>
An item that allows you to scroll between a set of objects.
Inherited Members
Namespace: LemonUI.Menus
Assembly: LemonUI.SHVDN3.dll
Syntax
public class NativeListItem<T> : NativeListItem, IDrawable, IEnumerable<T>, IEnumerable
Type Parameters
| Name | Description |
|---|---|
| T |
Constructors
View SourceNativeListItem(string, string, params T[])
Creates a new NativeListItem.
Declaration
public NativeListItem(string title, string subtitle, params T[] objs)
Parameters
| Type | Name | Description |
|---|---|---|
| string | title | The title of the Item. |
| string | subtitle | The subtitle of the Item. |
| T[] | objs | The objects that are available on the Item. |
NativeListItem(string, params T[])
Creates a new NativeListItem.
Declaration
public NativeListItem(string title, params T[] objs)
Parameters
| Type | Name | Description |
|---|---|---|
| string | title | The title of the Item. |
| T[] | objs | The objects that are available on the Item. |
Properties
View SourceItems
The objects used by this item.
Declaration
public List<T> Items { get; set; }
Property Value
| Type | Description |
|---|---|
| List<T> |
SelectedIndex
The index of the currently selected index.
Declaration
public int SelectedIndex { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
SelectedItem
The currently selected item.
Declaration
public T SelectedItem { get; set; }
Property Value
| Type | Description |
|---|---|
| T |
Methods
View SourceAdd(int, T)
Adds a T in a specific location.
Declaration
public void Add(int position, T item)
Parameters
| Type | Name | Description |
|---|---|---|
| int | position | The position where the item should be added. |
| T | item | The |
Add(T)
Adds a T into this item.
Declaration
public void Add(T item)
Parameters
| Type | Name | Description |
|---|---|---|
| T | item | The |
Clear()
Removes all of the T from this item.
Declaration
public void Clear()
Draw()
Draws the List on the screen.
Declaration
public override void Draw()
Overrides
View SourceGetEnumerator()
Declaration
public IEnumerator<T> GetEnumerator()
Returns
| Type | Description |
|---|---|
| IEnumerator<T> |
GoLeft()
Moves to the previous item.
Declaration
public override void GoLeft()
Overrides
View SourceGoRight()
Moves to the next item.
Declaration
public override void GoRight()
Overrides
View SourceRecalculate(PointF, SizeF, bool)
Recalculates the item positions and sizes with the specified values.
Declaration
public override void Recalculate(PointF pos, SizeF size, bool selected)
Parameters
| Type | Name | Description |
|---|---|---|
| PointF | pos | The position of the item. |
| SizeF | size | The size of the item. |
| bool | selected | If this item has been selected. |
Overrides
View SourceRemove(Func<T, bool>)
Removes all of the items that match the pred.
Declaration
public void Remove(Func<T, bool> pred)
Parameters
| Type | Name | Description |
|---|---|---|
| Func<T, bool> | pred | The function to use as a check. |
Remove(T)
Removes a specific T.
Declaration
public void Remove(T item)
Parameters
| Type | Name | Description |
|---|---|---|
| T | item | The |
RemoveAt(int)
Removes a T at a specific location.
Declaration
public void RemoveAt(int position)
Parameters
| Type | Name | Description |
|---|---|---|
| int | position | The position of the |
UpdateColors()
Updates the colors of the LemonUI.Elements from the Colors ColorSet.
Declaration
public override void UpdateColors()
Overrides
Events
View SourceItemChanged
Event triggered when the selected item is changed.
Declaration
public event ItemChangedEventHandler<T> ItemChanged
Event Type
| Type | Description |
|---|---|
| ItemChangedEventHandler<T> |