// C++
DLLFUNC var imgui_h_list_box (const char* label, int* current_item, bool(*items_getter)(void*, int, const char**), void* data, int items_count, int height_in_items) {
bool res = ImGui::ListBox(label, current_item, items_getter, data, items_count, height_in_items);
return res ? _VAR(1) : _VAR(0);
}
// liteC
var imgui_h_list_box (char* label, int* current_item, void *items_getter, void* data, int items_count, int height_in_items);
...
TEXT *txtList = {
string = (
"eoeoeo 1"
"eoeoeo 2"
"eoeoeo 3"
"eoeoeo 4"
"eoeoeo 5"
"eoeoeo 6"
);
}
BOOL _label_for_text(TEXT *_txt, int _index, char **_label) {
*_label = (_txt->pstring)[_index]->chars;
return TRUE;
}
...
static int _currentItem = -1;
imgui_h_list_box ("##TEXT list box", &_currentItem, _label_for_text, txtList, (int)txtList->strings, 10);