From 7f5d06d638ff24444da942cf91c130d5393818cb Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Mon, 20 Oct 2003 15:40:20 +0000 Subject: Another mega commit... loadsof restructure, and a pretty good one! :) - changed the BIF_DrawString() function. it used to work different for AA fonts as for default fonts. Now it's identical. Setting color for fonts can just be done with OpenGL, for both font types. Removed: BIF_DrawStringRGB() - added theme color options for Buttons - recoded DefButton, so it automatically chooses the right color. - had to remove a 1000 uiBlockSetCol() calls for that reason... - uiBlockSetCol() still works, to override automatic color - removed entirely the silly old color system (BIFColorID). All color calls can now be done with a BIF_ThemeColor() call, including fonts and buttons and opengl stuff - all buttons in button header have headercolor by default - recoded drawing icons, it was a really bad & old loop doing manually colorshading and blending... which was per pixel a load of code! Now it uses a single OpenGL call to blend or colorize. Quite faster! - (as test, for review) icons don't colorize anymore with button color, but have a different alpha to blend in (when not active) - recoded the entire interface_draw.c file...: - drawing buttons is separated in three parts: 1. main drawing function for text and icons 2. free definable callback for button itself 3. free definable callback for slider - removed a load of redundant code for this! - coded a minimal theme, and adjusted Matt's buttons to match new callback system - adding new drawing themes is piece of cake now - for coders, default 'themes' to be aware of: UI_EMBOSS : the themable drawing style UI_EMBOSSP: the pulldown menu system (apart from color not themable) UI_EMBOSSN: draw nothing, only text and/or icon UI_EMBOSSM: minimal theme, still in use for Logic and Constraintsa this can be set with uiBlockSetEmboss(block) or in the uiNewBlock() call. TODO: make UI API call for button alignment (plus removed another series of warnings from code...) Plus: fixed bug in Matts commit: he used a 'short' button for an 'int' --- source/blender/include/BIF_interface.h | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'source/blender/include/BIF_interface.h') diff --git a/source/blender/include/BIF_interface.h b/source/blender/include/BIF_interface.h index 579810a5903..60c5fab0e06 100644 --- a/source/blender/include/BIF_interface.h +++ b/source/blender/include/BIF_interface.h @@ -38,18 +38,12 @@ struct ListBase; struct ScrArea; /* uiBlock->dt */ -#define UI_EMBOSSX 0 /* Rounded embossed button */ -#define UI_EMBOSSW 1 /* Flat bordered button */ -#define UI_EMBOSSN 2 /* No border */ - -#define UI_EMBOSSM 4 /* Colored Border */ -#define UI_EMBOSSP 5 /* Borderless coloured button */ -#define UI_EMBOSSA 6 /* same as EMBOSSX but with arrows to simulate */ -#define UI_EMBOSSTABL 7 -#define UI_EMBOSSTABM 8 -#define UI_EMBOSSTABR 9 -#define UI_EMBOSST 10 -#define UI_EMBOSSMB 11 /* emboss menu button */ +#define UI_EMBOSS 0 /* use one of the themes for drawing */ +#define UI_EMBOSSN 1 /* Nothing */ +#define UI_EMBOSSM 2 /* Minimal builtin emboss, also for logic buttons */ +#define UI_EMBOSSP 3 /* Pulldown */ + +#define UI_EMBOSSX 0 /* for a python file, which i can't change.... duh! */ /* uiBlock->direction */ #define UI_TOP 0 -- cgit v1.2.3