Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_region_menu_popup.cc
| Show First 20 Lines • Show All 553 Lines • ▼ Show 20 Lines | if (mt == nullptr) { | ||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| } | } | ||||
| if (WM_menutype_poll(C, mt) == false) { | if (WM_menutype_poll(C, mt) == false) { | ||||
| /* cancel but allow event to pass through, just like operators do */ | /* cancel but allow event to pass through, just like operators do */ | ||||
| return (OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH); | return (OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH); | ||||
| } | } | ||||
| pup = UI_popup_menu_begin(C, IFACE_(mt->label), ICON_NONE); | pup = UI_popup_menu_begin(C, CTX_IFACE_(mt->translation_context, mt->label), ICON_NONE); | ||||
| layout = UI_popup_menu_layout(pup); | layout = UI_popup_menu_layout(pup); | ||||
| UI_menutype_draw(C, mt, layout); | UI_menutype_draw(C, mt, layout); | ||||
| UI_popup_menu_end(C, pup); | UI_popup_menu_end(C, pup); | ||||
| return OPERATOR_INTERFACE; | return OPERATOR_INTERFACE; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 111 Lines • Show Last 20 Lines | |||||