Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/editors/interface/interface_icons.c46
1 files changed, 22 insertions, 24 deletions
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index ed4131440d5..3173c962830 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -177,30 +177,6 @@ static const IconType icontypes[] = {
# include "UI_icons.h"
};
-/* ********** Alert Icons ********** */
-
-# define ALERT_IMG_SIZE 256
-
-ImBuf *UI_alert_image(eAlertIcon icon)
-{
-# ifdef WITH_HEADLESS
- return NULL
-# else
- ImBuf *ibuf;
- icon = MIN2(icon, ALERT_ICON_MAX - 1);
- const int left = icon * ALERT_IMG_SIZE;
- const rcti crop = {left, left + ALERT_IMG_SIZE - 1, 0, ALERT_IMG_SIZE - 1};
- ibuf = IMB_ibImageFromMemory((const uchar *)datatoc_alert_icons_png,
- datatoc_alert_icons_png_size,
- IB_rect,
- NULL,
- "alert_icon");
- IMB_rect_crop(ibuf, &crop);
- IMB_premultiply_alpha(ibuf);
- return ibuf;
-# endif
-}
-
/* **************************************************** */
static DrawInfo *def_internal_icon(
@@ -2392,3 +2368,25 @@ void UI_icon_draw_ex(float x,
mono_color,
mono_border);
}
+
+/* ********** Alert Icons ********** */
+
+ImBuf *UI_alert_image(eAlertIcon icon)
+{
+#ifdef WITH_HEADLESS
+ return NULL;
+#else
+ const int ALERT_IMG_SIZE = 256;
+ icon = MIN2(icon, ALERT_ICON_MAX - 1);
+ const int left = icon * ALERT_IMG_SIZE;
+ const rcti crop = {left, left + ALERT_IMG_SIZE - 1, 0, ALERT_IMG_SIZE - 1};
+ ImBuf *ibuf = IMB_ibImageFromMemory((const uchar *)datatoc_alert_icons_png,
+ datatoc_alert_icons_png_size,
+ IB_rect,
+ NULL,
+ "alert_icon");
+ IMB_rect_crop(ibuf, &crop);
+ IMB_premultiply_alpha(ibuf);
+ return ibuf;
+#endif
+}