mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-30 18:34:34 +01:00
ListBox() changed signature of ListBox() to match Combo(). Still not very happy about not using const char** anymore. (#931)
This commit is contained in:
parent
149523a101
commit
d9034bf2d8
@ -9502,7 +9502,7 @@ void ImGui::ListBoxFooter()
|
||||
EndGroup();
|
||||
}
|
||||
|
||||
bool ImGui::ListBox(const char* label, int* current_item, const char* const* items, int items_count, int height_items)
|
||||
bool ImGui::ListBox(const char* label, int* current_item, const char* const items[], int items_count, int height_items)
|
||||
{
|
||||
const bool value_changed = ListBox(label, current_item, Items_ArrayGetter, (void*)items, items_count, height_items);
|
||||
return value_changed;
|
||||
|
2
imgui.h
2
imgui.h
@ -377,7 +377,7 @@ namespace ImGui
|
||||
// Widgets: Selectable / Lists
|
||||
IMGUI_API bool Selectable(const char* label, bool selected = false, ImGuiSelectableFlags flags = 0, const ImVec2& size = ImVec2(0,0)); // size.x==0.0: use remaining width, size.x>0.0: specify width. size.y==0.0: use label height, size.y>0.0: specify height
|
||||
IMGUI_API bool Selectable(const char* label, bool* p_selected, ImGuiSelectableFlags flags = 0, const ImVec2& size = ImVec2(0,0));
|
||||
IMGUI_API bool ListBox(const char* label, int* current_item, const char* const* items, int items_count, int height_in_items = -1);
|
||||
IMGUI_API bool ListBox(const char* label, int* current_item, const char* const items[], int items_count, int height_in_items = -1);
|
||||
IMGUI_API bool ListBox(const char* label, int* current_item, bool (*items_getter)(void* data, int idx, const char** out_text), void* data, int items_count, int height_in_items = -1);
|
||||
IMGUI_API bool ListBoxHeader(const char* label, const ImVec2& size = ImVec2(0,0)); // use if you want to reimplement ListBox() will custom data or interactions. make sure to call ListBoxFooter() afterwards.
|
||||
IMGUI_API bool ListBoxHeader(const char* label, int items_count, int height_in_items = -1); // "
|
||||
|
Loading…
Reference in New Issue
Block a user