mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-07 05:28:47 +02:00
Combo: amends for ImGuiComboFlags_WidthFitPreview. (#6881)
Amend 112d8fc
This commit is contained in:
@ -1190,11 +1190,12 @@ static void ShowDemoWindowWidgets()
|
||||
static ImGuiComboFlags flags = 0;
|
||||
ImGui::CheckboxFlags("ImGuiComboFlags_PopupAlignLeft", &flags, ImGuiComboFlags_PopupAlignLeft);
|
||||
ImGui::SameLine(); HelpMarker("Only makes a difference if the popup is larger than the combo");
|
||||
ImGui::CheckboxFlags("ImGuiComboFlags_WidthFitPreview", &flags, ImGuiComboFlags_WidthFitPreview);
|
||||
if (ImGui::CheckboxFlags("ImGuiComboFlags_NoArrowButton", &flags, ImGuiComboFlags_NoArrowButton))
|
||||
flags &= ~ImGuiComboFlags_NoPreview; // Clear the other flag, as we cannot combine both
|
||||
if (ImGui::CheckboxFlags("ImGuiComboFlags_NoPreview", &flags, ImGuiComboFlags_NoPreview))
|
||||
flags &= ~ImGuiComboFlags_NoArrowButton; // Clear the other flag, as we cannot combine both
|
||||
flags &= ~(ImGuiComboFlags_NoArrowButton | ImGuiComboFlags_WidthFitPreview); // Clear the other flag, as we cannot combine both
|
||||
if (ImGui::CheckboxFlags("ImGuiComboFlags_WidthFitPreview", &flags, ImGuiComboFlags_WidthFitPreview))
|
||||
flags &= ~ImGuiComboFlags_NoPreview;
|
||||
|
||||
// Using the generic BeginCombo() API, you have full control over how to display the combo contents.
|
||||
// (your selection data could be an index, a pointer to the object, an id for the object, a flag intrusively
|
||||
|
Reference in New Issue
Block a user