| 466 | #pragma warning( push ) |
| 467 | #pragma warning( disable : 4996 ) |
| 468 | struct ComboAutoSelectData |
| 469 | { |
| 470 | std::vector<std::string> items; |
| 471 | int index = -1; |
| 472 | char input[128] = {}; |
| 473 | |
| 474 | ComboAutoSelectData() = default; |
| 475 | |
| 476 | explicit ComboAutoSelectData(const std::vector<std::string>& hints, const int selected_index = -1) |
| 477 | : items(hints) |
| 478 | { |
| 479 | if (selected_index > -1 && selected_index < static_cast<int>(items.size())) |
| 480 | { |
| 481 | strncpy(input, items[selected_index].c_str(), sizeof(input) - 1); |
| 482 | index = selected_index; |
| 483 | } |
| 484 | } |
| 485 | }; |
| 486 | |
| 487 | inline bool ComboAutoSelectComplex(const char* label, char* input, const int inputlen, int* current_item, |
| 488 | std::vector<std::string> data, const int items_count, const ImGuiComboFlags flags) |
nothing calls this directly
no outgoing calls
no test coverage detected