|
@@ -1190,11 +1190,12 @@ static void ShowDemoWindowWidgets()
|
|
static ImGuiComboFlags flags = 0;
|
|
static ImGuiComboFlags flags = 0;
|
|
ImGui::CheckboxFlags("ImGuiComboFlags_PopupAlignLeft", &flags, ImGuiComboFlags_PopupAlignLeft);
|
|
ImGui::CheckboxFlags("ImGuiComboFlags_PopupAlignLeft", &flags, ImGuiComboFlags_PopupAlignLeft);
|
|
ImGui::SameLine(); HelpMarker("Only makes a difference if the popup is larger than the combo");
|
|
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))
|
|
if (ImGui::CheckboxFlags("ImGuiComboFlags_NoArrowButton", &flags, ImGuiComboFlags_NoArrowButton))
|
|
flags &= ~ImGuiComboFlags_NoPreview; // Clear the other flag, as we cannot combine both
|
|
flags &= ~ImGuiComboFlags_NoPreview; // Clear the other flag, as we cannot combine both
|
|
if (ImGui::CheckboxFlags("ImGuiComboFlags_NoPreview", &flags, ImGuiComboFlags_NoPreview))
|
|
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.
|
|
// 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
|
|
// (your selection data could be an index, a pointer to the object, an id for the object, a flag intrusively
|