You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lets try this list box and select element
it doen't work:(
const char* items[] = { "AAAA", "AAAA", "AAAA", "DDDD", "DDDD", "FFFF", "GGGG", "DDDD", "IIII", "JJJJ", "KKKK", "LLLLLLL", "MMMM", "DDDD" };
static int item_current_idx = 0; // Here we store our selection data as an index.
if (ImGui::BeginListBox("listbox 1"))
{
for (int n = 0; n < IM_ARRAYSIZE(items); n++)
{
const bool is_selected = (item_current_idx == n);
if (ImGui::Selectable(items[n], is_selected))
item_current_idx = n;
// Set the initial focus when opening the combo (scrolling + keyboard navigation focus)
if (is_selected)
ImGui::SetItemDefaultFocus();
}
ImGui::EndListBox();
}
The text was updated successfully, but these errors were encountered:
lets try this list box and select element
it doen't work:(
const char* items[] = { "AAAA", "AAAA", "AAAA", "DDDD", "DDDD", "FFFF", "GGGG", "DDDD", "IIII", "JJJJ", "KKKK", "LLLLLLL", "MMMM", "DDDD" };
static int item_current_idx = 0; // Here we store our selection data as an index.
if (ImGui::BeginListBox("listbox 1"))
{
for (int n = 0; n < IM_ARRAYSIZE(items); n++)
{
const bool is_selected = (item_current_idx == n);
if (ImGui::Selectable(items[n], is_selected))
item_current_idx = n;
The text was updated successfully, but these errors were encountered: