Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_templates.c
| Show First 20 Lines • Show All 6,452 Lines • ▼ Show 20 Lines | #ifdef WITH_HEADLESS | ||||
| int icon = 0; | int icon = 0; | ||||
| #else | #else | ||||
| const int icon = UI_icon_from_keymap_item(kmi, icon_mod); | const int icon = UI_icon_from_keymap_item(kmi, icon_mod); | ||||
| #endif | #endif | ||||
| if (icon != 0) { | if (icon != 0) { | ||||
| for (int j = 0; j < ARRAY_SIZE(icon_mod) && icon_mod[j]; j++) { | for (int j = 0; j < ARRAY_SIZE(icon_mod) && icon_mod[j]; j++) { | ||||
| uiItemL(layout, "", icon_mod[j]); | uiItemL(layout, "", icon_mod[j]); | ||||
| } | } | ||||
| uiItemL(layout, text, icon); | uiItemL(layout, TIP_(text), icon); | ||||
| ok = true; | ok = true; | ||||
| } | } | ||||
| else if (text_fallback) { | else if (text_fallback) { | ||||
| const char *event_text = WM_key_event_string(kmi->type, true); | const char *event_text = WM_key_event_string(kmi->type, true); | ||||
| uiItemL(layout, event_text, ICON_NONE); | uiItemL(layout, event_text, ICON_NONE); | ||||
| uiItemL(layout, text, ICON_NONE); | uiItemL(layout, TIP_(text), ICON_NONE); | ||||
| ok = true; | ok = true; | ||||
| } | } | ||||
| return ok; | return ok; | ||||
| } | } | ||||
| /** \} */ | /** \} */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| ▲ Show 20 Lines • Show All 420 Lines • Show Last 20 Lines | |||||