Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface.c
| Context not available. | |||||
| return UI_BUT_ICONEXTRA_CLEAR; | return UI_BUT_ICONEXTRA_CLEAR; | ||||
| } | } | ||||
| break; | break; | ||||
| case UI_BTYPE_BUT_MENU: | |||||
| if ((but->flag & UI_BUT_CURRENT)) { | |||||
| return UI_BUT_ICONEXTRA_CURRENT; | |||||
| } | |||||
| break; | |||||
| case UI_BTYPE_SEARCH_MENU: | case UI_BTYPE_SEARCH_MENU: | ||||
| if ((but->flag & UI_BUT_VALUE_CLEAR) == 0) { | if ((but->flag & UI_BUT_VALUE_CLEAR) == 0) { | ||||
| /* pass */ | /* pass */ | ||||
| Context not available. | |||||
| uiPopupBlockHandle *handle = block->handle; | uiPopupBlockHandle *handle = block->handle; | ||||
| uiBut *but = (uiBut *)but_p; | uiBut *but = (uiBut *)but_p; | ||||
| int current_value = RNA_property_enum_get(&but->rnapoin, but->rnaprop); | |||||
| /* see comment in ui_item_enum_expand, re: uiname */ | /* see comment in ui_item_enum_expand, re: uiname */ | ||||
| const EnumPropertyItem *item, *item_array; | const EnumPropertyItem *item, *item_array; | ||||
| bool free; | bool free; | ||||
| Context not available. | |||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| uiBut *item_but; | |||||
| if (item->icon) { | if (item->icon) { | ||||
| uiDefIconTextButI(block, | item_but = uiDefIconTextButI(block, | ||||
| UI_BTYPE_BUT_MENU, | UI_BTYPE_BUT_MENU, | ||||
| B_NOP, | B_NOP, | ||||
| item->icon, | item->icon, | ||||
| Context not available. | |||||
| item->description); | item->description); | ||||
| } | } | ||||
| else { | else { | ||||
| uiDefButI(block, | item_but = uiDefButI(block, | ||||
| UI_BTYPE_BUT_MENU, | UI_BTYPE_BUT_MENU, | ||||
| B_NOP, | B_NOP, | ||||
| item->name, | item->name, | ||||
| Context not available. | |||||
| -1, | -1, | ||||
| item->description); | item->description); | ||||
| } | } | ||||
| if (item->value == current_value) { | |||||
| item_but->flag |= UI_BUT_CURRENT; | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| Context not available. | |||||