- added UI_EMBOSSR option (rounded emboss)
- added support for vector icons, from user API side is just like using a regular icon... on icon side is defined by a function in resources.c instead of using the blenderbuttons png file. vector icons are much easier to add and scale properly. intent is that vector icons would be drawn in window coordinates which lets icon developers make the most beautiful icons, but this requires some tweaking of the interface drawing that I am not going to do atm. - changed BIF_draw_icon* to take coordinates of where to draw icon instead of using passed in raster position - switch modifier UI to using vector icons, and tweaked some position and style stuff. - replaced most uses of UI_EMBOSSX with UI_EMBOSS (do same thing, just there to confuse people I guess) After the window coordinate stuff is sorted out with vector icons it probably makes sense to move all non-photorealistic icons in blenderbuttons to vector form just so scaling goes better.
This commit is contained in:
@@ -42,6 +42,7 @@ struct ScrArea;
|
||||
#define UI_EMBOSSN 1 /* Nothing */
|
||||
#define UI_EMBOSSM 2 /* Minimal builtin emboss, also for logic buttons */
|
||||
#define UI_EMBOSSP 3 /* Pulldown */
|
||||
#define UI_EMBOSSR 4 /* Rounded */
|
||||
|
||||
#define UI_EMBOSSX 0 /* for a python file, which i can't change.... duh! */
|
||||
|
||||
|
||||
@@ -299,9 +299,19 @@ typedef enum {
|
||||
ICON_CURSOR,
|
||||
ICON_ROTATECOLLECTION,
|
||||
ICON_ROTATECENTER,
|
||||
ICON_ROTACTIVE
|
||||
|
||||
#define BIFICONID_LAST (ICON_ROTACTIVE)
|
||||
ICON_ROTACTIVE,
|
||||
|
||||
VICON_VIEW3D,
|
||||
VICON_EDIT,
|
||||
VICON_EDITMODE_DEHLT,
|
||||
VICON_EDITMODE_HLT,
|
||||
VICON_DISCLOSURE_TRI_RIGHT,
|
||||
VICON_DISCLOSURE_TRI_DOWN,
|
||||
VICON_MOVE_UP,
|
||||
VICON_MOVE_DOWN,
|
||||
VICON_X
|
||||
|
||||
#define BIFICONID_LAST (VICON_X)
|
||||
#define BIFNICONIDS (BIFICONID_LAST-BIFICONID_FIRST + 1)
|
||||
} BIFIconID;
|
||||
|
||||
@@ -495,8 +505,8 @@ void BIF_load_ui_colors (void);
|
||||
// icon API
|
||||
int BIF_get_icon_width (BIFIconID icon);
|
||||
int BIF_get_icon_height (BIFIconID icon);
|
||||
void BIF_draw_icon (BIFIconID icon);
|
||||
void BIF_draw_icon_blended (BIFIconID icon, int colorid, int shade);
|
||||
void BIF_draw_icon (float x, float y, BIFIconID icon);
|
||||
void BIF_draw_icon_blended (float x, float y, BIFIconID icon, int colorid, int shade);
|
||||
|
||||
/* only for buttons in theme editor! */
|
||||
char *BIF_ThemeGetColorPtr(struct bTheme *btheme, int spacetype, int colorid);
|
||||
|
||||
Reference in New Issue
Block a user