4x11 / build69

64 stars 66 forks source link

DIALOG_STYLE_LIST Color Embed #13

Closed qqwrv-f10eq closed 5 years ago

qqwrv-f10eq commented 5 years ago
            const char* items[] = /* explode m_putf8Info with \n */;
            static const char* current_item = NULL;

            ImGui::BeginChild("Scrolling", ImVec2(0, ImGui::GetFrameHeightWithSpacing()*7 + 30), false);

            for (int n = 0; n < IM_ARRAYSIZE(items); n++)
            {
                bool is_selected = (current_item == items[n]);
                if (ImGui::Selectable(items[n], is_selected)) current_item = items[n];
                if (is_selected) ImGui::SetItemDefaultFocus();
            }

            ImGui::EndChild();

I have tried on TextWithColors It just text can't select (TextUnformatted).