Internals: Moved CalcItemSize next to CalcItemWidth, added comments to clarify their respective intent. Should have no side effect.

This commit is contained in:
omar
2019-04-18 13:46:45 +02:00
parent 240dddff87
commit 9d4a893a77
3 changed files with 21 additions and 15 deletions

View File

@ -5440,6 +5440,9 @@ bool ImGui::Selectable(const char* label, bool* p_selected, ImGuiSelectableFlags
// - ListBoxHeader()
// - ListBoxFooter()
//-------------------------------------------------------------------------
// FIXME: This is an old API. We should redesign some of it, rename ListBoxHeader->BeginListBox, ListBoxFooter->EndListBox
// and promote using them over existing ListBox() functions, similarly to change with combo boxes.
//-------------------------------------------------------------------------
// FIXME: In principle this function should be called BeginListBox(). We should rename it after re-evaluating if we want to keep the same signature.
// Helper to calculate the size of a listbox and display a label on the right.