diff options
Diffstat (limited to 'source/blender/editors/interface/interface_utils.c')
-rw-r--r-- | source/blender/editors/interface/interface_utils.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c index ed4852bf81d..fa6eef40298 100644 --- a/source/blender/editors/interface/interface_utils.c +++ b/source/blender/editors/interface/interface_utils.c @@ -44,6 +44,7 @@ #include "BLF_translation.h" #include "BKE_context.h" +#include "BKE_report.h" #include "MEM_guardedalloc.h" @@ -231,6 +232,19 @@ int uiIconFromID(ID *id) return (ptr.type) ? RNA_struct_ui_icon(ptr.type) : ICON_NONE; } +/* see: report_type_str */ +int uiIconFromReportType(int type) +{ + if (type & RPT_ERROR_ALL) + return ICON_ERROR; + else if (type & RPT_WARNING_ALL) + return ICON_ERROR; + else if (type & RPT_INFO_ALL) + return ICON_INFO; + else + return ICON_NONE; +} + /********************************** Misc **************************************/ /** |