ImGuiList<T> Class
Definition
Section titled “Definition”Wraps a collection of objects for ImGui controls, like list boxes.
public class ImGuiList<T> where T : classType Parameters
Section titled “Type Parameters”T
The type of object wrapped.
Inheritance object
Constructors
Section titled “Constructors”ImGuiList(params T[])
Section titled “ImGuiList(params T[])”Creates a new list, wrapping the provided items.
public ImGuiList(params T[] items)Parameters
Section titled “Parameters”items T[]
The items to wrap.
ImGuiList(IEnumerable<T>)
Section titled “ImGuiList(IEnumerable<T>)”Creates a new list, wrapping the provided items.
public ImGuiList(IEnumerable<T> items)Parameters
Section titled “Parameters”items IEnumerable<T>
The items to wrap.
ImGuiList(int, params T[])
Section titled “ImGuiList(int, params T[])”Creates a new list, wrapping the provided items, and sets which item is selected.
public ImGuiList(int selectedIndex, params T[] items)Parameters
Section titled “Parameters”selectedIndex int
The 0-based index of the item to select.
items T[]
The items to wrap.
ImGuiList(int, IEnumerable<T>)
Section titled “ImGuiList(int, IEnumerable<T>)”Creates a new list, wrapping the provided items, and sets which item is selected.
public ImGuiList(int selectedIndex, IEnumerable<T> items)Parameters
Section titled “Parameters”selectedIndex int
The 0-based index of the item to select.
items IEnumerable<T>
The items to wrap.
Fields
Section titled “Fields”SelectedItemIndex
Section titled “SelectedItemIndex”The selected index. Controlled by ImGui objects.
public int SelectedItemIndexProperties
Section titled “Properties”Each item’s title.
public string[] Names { get; }Remarks
Section titled “Remarks”Refreshed when this property is accessed.
Objects
Section titled “Objects”The objects wrapped by this list.
public ObservableCollection<T> Objects { get; }The number of items this list is wrapping.
public int Count { get; }SelectedItem
Section titled “SelectedItem”The selected item or null.
public T? SelectedItem { get; set; }Methods
Section titled “Methods”IsItemSelected()
Section titled “IsItemSelected()”Indicates that an item is selected.
public bool IsItemSelected()Returns
Section titled “Returns”bool
Checks if SelectedItemIndex doesn’t equal -1.