UI: Change menu icons of single-choice enums to radio buttons #111796

Merged
Harley Acheson merged 1 commits from Mysteryem/blender:ui_enum_menu_item_radio_icons into main 2023-09-13 19:24:25 +02:00
1 changed files with 2 additions and 1 deletions

View File

@ -2172,7 +2172,8 @@ void uiItemFullR(uiLayout *layout,
icon = (enum_value & value) ? ICON_CHECKBOX_HLT : ICON_CHECKBOX_DEHLT;
}
else {
icon = (enum_value == value) ? ICON_CHECKBOX_HLT : ICON_CHECKBOX_DEHLT;
/* Only a single value can be chosen, so display as radio buttons. */
icon = (enum_value == value) ? ICON_RADIOBUT_ON : ICON_RADIOBUT_OFF;
}
}
}