UI: Larger Alert Icons

Adding a set of larger icons for use in informational dialogs.

Differential Revision: https://developer.blender.org/D6859

Reviewed by Campbell Barton
This commit is contained in:
2020-03-14 11:05:09 -07:00
parent a816a067ed
commit a210b8297f
16 changed files with 405 additions and 81 deletions

View File

@@ -48,6 +48,9 @@ extern char datatoc_blender_icons32_png[];
extern int datatoc_prvicons_png_size;
extern char datatoc_prvicons_png[];
extern int datatoc_alert_icons_png_size;
extern char datatoc_alert_icons_png[];
extern int datatoc_splash_png_size;
extern char datatoc_splash_png[];

View File

@@ -1124,7 +1124,10 @@ uiBut *uiDefIconButO_ptr(uiBlock *block,
short width,
short height,
const char *tip);
uiBut *uiDefButImage(
uiBlock *block, void *imbuf, int x, int y, short width, short height, const uchar color[4]);
uiBut *uiDefButAlert(
uiBlock *block, int icon, int x, int y, short width, short height);
uiBut *uiDefIconTextBut(uiBlock *block,
int type,
int retval,

View File

@@ -52,6 +52,17 @@ typedef struct IconFile {
#define PREVIEW_DEFAULT_HEIGHT 128
typedef enum eAlertIcon {
ALERT_ICON_WARNING = 0,
ALERT_ICON_QUESTION = 1,
ALERT_ICON_ERROR = 2,
ALERT_ICON_INFO = 3,
ALERT_ICON_BLENDER = 4,
ALERT_ICON_MAX,
} eAlertIcon;
struct ImBuf *UI_alert_image(eAlertIcon icon);
/*
* Resizable Icons for Blender
*/