- The basic layer for Themes in place!

- currently only implemented for 3d window
- create as many themes you like, and name them
- default theme is not editable, and always will be defined at startup
  (initTheme)
- saves in .B.blend
- themes for spaces can become local too, so you can set individual
  3d windows at theme 'Maya' or so. (to be implemented)
- it uses alpha as well...!

API:
This doesnt use the old method with BFCOLORID blahblah. The API is copied
from OpenGL conventions (naming) as much as possible:

- void BIF_ThemeColor(ScrArea *sa, int colorid)
  sets a color... id's are in BIF_resources.h (TH_GRID, TH_WIRE, etc)

- void BIF_ThemeColorShade(ScrArea *sa, int colorid, int offset)
  sets a color with offset, no more weird COLORSHADE_LGREY stuff

- void BIF_GetThemeColor3fv(ScrArea *sa, int colorid, float *col)
  like opengl, this gives you in *col the three rgb values

- void BIF_GetThemeColor4ubv(ScrArea *sa, int colorid, char *col)
  or the one to get 4 bytes

ThemeColor calls for globals (UI etc) can also call NULL for *sa... this
is to be implemented still.

Next step: cleaning up interface.c for all weird colorcalls.
This commit is contained in:
2003-10-17 14:02:08 +00:00
parent 00cf36d6a5
commit 0321602b65
20 changed files with 757 additions and 107 deletions

View File

@@ -272,7 +272,7 @@ void calc_oopstext(char *str, float *v1)
}
void draw_oops(Oops *oops, uiBlock *block)
void draw_oops(Oops *oops)
{
OopsLink *ol;
float v1[2], x1, y1, x2, y2, f1, f2;
@@ -367,7 +367,6 @@ void draw_oops(Oops *oops, uiBlock *block)
void drawoopsspace(ScrArea *sa, void *spacedata)
{
uiBlock *block;
Oops *oops;
int ofsx, ofsy;
@@ -404,14 +403,14 @@ void drawoopsspace(ScrArea *sa, void *spacedata)
oops= G.soops->oops.first;
while(oops) {
if(oops->hide==0) {
if(oops->flag & SELECT); else draw_oops(oops, block);
if(oops->flag & SELECT); else draw_oops(oops);
}
oops= oops->next;
}
oops= G.soops->oops.first;
while(oops) {
if(oops->hide==0) {
if(oops->flag & SELECT) draw_oops(oops, block);
if(oops->flag & SELECT) draw_oops(oops);
}
oops= oops->next;
}