Skip to content

ImGuiList<T> Class

Wraps a collection of objects for ImGui controls, like list boxes.

C#
public class ImGuiList<T> where T : class

T
The type of object wrapped.

Inheritance object

Creates a new list, wrapping the provided items.

C#
public ImGuiList(params T[] items)

items T[]
The items to wrap.

Creates a new list, wrapping the provided items.

C#
public ImGuiList(IEnumerable<T> items)

items IEnumerable<T>
The items to wrap.

Creates a new list, wrapping the provided items, and sets which item is selected.

C#
public ImGuiList(int selectedIndex, params T[] items)

selectedIndex int
The 0-based index of the item to select.

items T[]
The items to wrap.

Creates a new list, wrapping the provided items, and sets which item is selected.

C#
public ImGuiList(int selectedIndex, IEnumerable<T> items)

selectedIndex int
The 0-based index of the item to select.

items IEnumerable<T>
The items to wrap.

The selected index. Controlled by ImGui objects.

C#
public int SelectedItemIndex

Each item’s title.

C#
public string[] Names { get; }

Refreshed when this property is accessed.

The objects wrapped by this list.

C#
public ObservableCollection<T> Objects { get; }

The number of items this list is wrapping.

C#
public int Count { get; }

The selected item or null.

C#
public T? SelectedItem { get; set; }

Indicates that an item is selected.

C#
public bool IsItemSelected()

bool
Checks if SelectedItemIndex doesn’t equal -1.