diff options
author | Ton Roosendaal <ton@blender.org> | 2003-10-23 03:20:44 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2003-10-23 03:20:44 +0400 |
commit | 164fa06c1178a756806f1b42850ad3d197a2577d (patch) | |
tree | 0883ad64c8733b1dac0af446c72d85f3bfb1333e | |
parent | d213b7d0db428ed010d8f3f633443c94376837fc (diff) |
- themed all window types... phew!
BTW: text colors don't work everywhere yet... but this state should
be save to store themes in your .B.blend (CTRL+X)
and some fixes:
- leftmouse click now works in NLA and Action window to select a
strip in the left part
- faceselect+vpaint mode didnt show both panels
-rw-r--r-- | source/blender/src/buttons_editing.c | 15 | ||||
-rw-r--r-- | source/blender/src/drawaction.c | 139 | ||||
-rw-r--r-- | source/blender/src/drawimage.c | 25 | ||||
-rw-r--r-- | source/blender/src/drawimasel.c | 23 | ||||
-rw-r--r-- | source/blender/src/drawipo.c | 2 | ||||
-rw-r--r-- | source/blender/src/drawnla.c | 94 | ||||
-rw-r--r-- | source/blender/src/drawoops.c | 5 | ||||
-rw-r--r-- | source/blender/src/drawseq.c | 13 | ||||
-rw-r--r-- | source/blender/src/drawsound.c | 6 | ||||
-rw-r--r-- | source/blender/src/drawtext.c | 20 | ||||
-rw-r--r-- | source/blender/src/editaction.c | 44 | ||||
-rw-r--r-- | source/blender/src/editnla.c | 22 | ||||
-rw-r--r-- | source/blender/src/resources.c | 121 | ||||
-rw-r--r-- | source/blender/src/space.c | 22 |
14 files changed, 315 insertions, 236 deletions
diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index 0ac9d3705cc..0022eae1416 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -816,6 +816,8 @@ void do_curvebuts(unsigned short event) nu= nu->next; } } + makeDispList(G.obedit); + allqueue(REDRAWVIEW3D, 0); break; case B_SETRESOLU: if(ob->type==OB_CURVE) { @@ -1932,7 +1934,7 @@ static void editing_panel_mesh_texface(void) extern TFace *lasttface; block= uiNewBlock(&curarea->uiblocks, "editing_panel_mesh_texface", UI_EMBOSS, UI_HELV, curarea->win); - if(uiNewPanel(curarea, block, "Texture face", "Editing", 640, 0, 318, 204)==0) return; + if(uiNewPanel(curarea, block, "Texture face", "Editing", 960, 0, 318, 204)==0) return; set_lasttface(); // checks for ob type if(lasttface) { @@ -1990,11 +1992,12 @@ void editing_panels() editing_panel_mesh_tools(ob, ob->data); // no editmode! editing_panel_mesh_tools1(ob, ob->data); // no editmode! } - else if(G.f & G_FACESELECT) { - editing_panel_mesh_texface(); - } - else if(G.f & (G_VERTEXPAINT | G_TEXTUREPAINT) ) { - editing_panel_mesh_paint(); + else { + if(G.f & G_FACESELECT) + editing_panel_mesh_texface(); + + if(G.f & (G_VERTEXPAINT | G_TEXTUREPAINT) ) + editing_panel_mesh_paint(); } break; diff --git a/source/blender/src/drawaction.c b/source/blender/src/drawaction.c index fb07c245d28..fc79033c496 100644 --- a/source/blender/src/drawaction.c +++ b/source/blender/src/drawaction.c @@ -115,7 +115,7 @@ void meshactionbuts(SpaceAction *saction, Key *key) char str[64]; float x, y; uiBlock *block; -#define RVKBGCOL .6, .65, .7 + #define XIC 20 #define YIC 20 @@ -136,7 +136,7 @@ void meshactionbuts(SpaceAction *saction, Key *key) - CHANNELHEIGHT/2 - G.v2d->cur.ymin; /* make the little 'open the sliders' widget */ - glColor3f(RVKBGCOL); + BIF_ThemeColor(TH_FACE); // this slot was open... glRects(2, y + 2*CHANNELHEIGHT - 2, ACTWIDTH - 2, y + CHANNELHEIGHT + 2); glColor3ub(0, 0, 0); @@ -164,7 +164,8 @@ void meshactionbuts(SpaceAction *saction, Key *key) ACTWIDTH = NAMEWIDTH + SLIDERWIDTH; /* sliders are open so draw them */ - glColor3f(RVKBGCOL); + BIF_ThemeColor(TH_FACE); + glRects(NAMEWIDTH, 0, NAMEWIDTH+SLIDERWIDTH, curarea->winy); uiBlockSetEmboss(block, UI_EMBOSS); for (i=1 ; i < key->totkey ; ++ i) { @@ -214,39 +215,40 @@ void draw_cfra_action(void) } -static void draw_action_channel_names(bAction *act) { +static void draw_action_channel_names(bAction *act) +{ bActionChannel *chan; bConstraintChannel *conchan; float x, y; x = 0.0; - y= count_action_levels(act)*(CHANNELHEIGHT+CHANNELSKIP); - - for (chan=act->chanbase.first; chan; chan=chan->next){ - glColor3ub(0xAA, 0xAA, 0xAA); - glRectf(x, y-CHANNELHEIGHT/2, (float)NAMEWIDTH, y+CHANNELHEIGHT/2); - - if (chan->flag & ACHAN_SELECTED) - glColor3ub(255, 255, 255); - else - glColor3ub(0, 0, 0); - glRasterPos2f(x+8, y-4); - BMF_DrawString(G.font, chan->name); - y-=CHANNELHEIGHT+CHANNELSKIP; - - /* Draw constraint channels */ - for (conchan=chan->constraintChannels.first; - conchan; conchan=conchan->next){ - if (conchan->flag & CONSTRAINT_CHANNEL_SELECT) - glColor3ub(255, 255, 255); - else - glColor3ub(0, 0, 0); + y= count_action_levels(act)*(CHANNELHEIGHT+CHANNELSKIP); + + for (chan=act->chanbase.first; chan; chan=chan->next){ + BIF_ThemeColorShade(TH_HEADER, 20); + glRectf(x, y-CHANNELHEIGHT/2, (float)NAMEWIDTH, y+CHANNELHEIGHT/2); + + if (chan->flag & ACHAN_SELECTED) + BIF_ThemeColor(TH_TEXT_HI); + else + BIF_ThemeColor(TH_TEXT); + glRasterPos2f(x+8, y-4); + BMF_DrawString(G.font, chan->name); + y-=CHANNELHEIGHT+CHANNELSKIP; + + /* Draw constraint channels */ + for (conchan=chan->constraintChannels.first; + conchan; conchan=conchan->next){ + if (conchan->flag & CONSTRAINT_CHANNEL_SELECT) + BIF_ThemeColor(TH_TEXT_HI); + else + BIF_ThemeColor(TH_TEXT); - glRasterPos2f(x+32, y-4); - BMF_DrawString(G.font, conchan->name); - y-=CHANNELHEIGHT+CHANNELSKIP; - } + glRasterPos2f(x+32, y-4); + BMF_DrawString(G.font, conchan->name); + y-=CHANNELHEIGHT+CHANNELSKIP; } + } } @@ -295,9 +297,9 @@ static void draw_action_mesh_names(Key *key) { static void draw_channel_names(void) { short ofsx, ofsy = 0; - float y; bAction *act; Key *key; + float col[3]; myortho2(0, NAMEWIDTH, G.v2d->cur.ymin, G.v2d->cur.ymax); // Scaling @@ -315,7 +317,8 @@ static void draw_channel_names(void) } } - glClearColor(.8, .8, .8, 0.0); + BIF_GetThemeColor3fv(TH_HEADER, col); + glClearColor(col[0], col[1], col[2], 0.0); glClear(GL_COLOR_BUFFER_BIT); /* Clip to the scrollable area */ @@ -343,47 +346,6 @@ static void draw_channel_names(void) myortho2(0, NAMEWIDTH, 0, (ofsy+G.v2d->mask.ymax) - (ofsy+G.v2d->mask.ymin-SCROLLB)); // Scaling - glShadeModel(GL_SMOOTH); - - y=9; - - /* Draw sexy shaded block thingies - Reevan: if you start developing this stuff again - you can have your blend's back - - glEnable (GL_BLEND); - glBegin(GL_QUAD_STRIP); - glColor4ub (0xCC,0xCC,0xCC,0x00); - glVertex2f (0,SCROLLB*2-y); - glVertex2f (NAMEWIDTH,SCROLLB*2-y); - - glColor4ub (0xCC,0xCC,0xCC,0xFF); - glVertex2f (0,SCROLLB-y); - glVertex2f (NAMEWIDTH,SCROLLB-y); - - glColor4ub (0xCC,0xCC,0xCC,0xFF); - glVertex2f (0,0-y); - glVertex2f (NAMEWIDTH,0-y); - - glEnd(); - */ - - /* y=( ofsy+G.v2d->mask.ymax)-( ofsy+G.v2d->mask.ymin-SCROLLB); - - glBegin(GL_QUAD_STRIP); - glColor4ub (0x88,0x88,0x88,0xFF); - glVertex2f (0,y); - glVertex2f (NAMEWIDTH,y); - glColor4ub (0x88,0x88,0x88,0x00); - glVertex2f (0,y-SCROLLB); - glVertex2f (NAMEWIDTH,y-SCROLLB); - - glEnd(); - */ - glDisable (GL_BLEND); - - glShadeModel(GL_FLAT); - } int count_action_levels(bAction *act) @@ -445,6 +407,10 @@ static void draw_channel_strips(SpaceAction *saction) bActionChannel *chan; bConstraintChannel *conchan; float y; + char col1[3], col2[3]; + + BIF_GetThemeColor3ubv(TH_SHADE2, col2); + BIF_GetThemeColor3ubv(TH_HILITE, col1); act= saction->action; if (!act) @@ -464,12 +430,12 @@ static void draw_channel_strips(SpaceAction *saction) gla2DDrawTranslatePt(di, 1, y, &frame1_x, &channel_y); glEnable(GL_BLEND); - if (chan->flag & ACHAN_SELECTED) glColor4b(0x11, 0x22, 0x55, 0x22); - else glColor4b(0x55, 0x22, 0x11, 0x22); + if (chan->flag & ACHAN_SELECTED) glColor4b(col1[0], col1[1], col1[2], 0x22); + else glColor4b(col2[0], col2[1], col2[2], 0x22); glRectf(0, channel_y-CHANNELHEIGHT/2, frame1_x, channel_y+CHANNELHEIGHT/2); - if (chan->flag & ACHAN_SELECTED) glColor4b(0x11, 0x22, 0x55, 0x44); - else glColor4b(0x55, 0x22, 0x11, 0x44); + if (chan->flag & ACHAN_SELECTED) glColor4b(col1[0], col1[1], col1[2], 0x44); + else glColor4b(col2[0], col2[1], col2[2], 0x44); glRectf(frame1_x, channel_y-CHANNELHEIGHT/2, G.v2d->hor.xmax, channel_y+CHANNELHEIGHT/2); glDisable(GL_BLEND); @@ -483,12 +449,12 @@ static void draw_channel_strips(SpaceAction *saction) for (conchan=chan->constraintChannels.first; conchan; conchan=conchan->next){ gla2DDrawTranslatePt(di, 1, y, &frame1_x, &channel_y); glEnable(GL_BLEND); - if (conchan->flag & ACHAN_SELECTED) glColor4b(0x11, 0x22, 0x55, 0x22); - else glColor4b(0x55, 0x22, 0x11, 0x22); + if (conchan->flag & ACHAN_SELECTED) glColor4b(col1[0], col1[1], col1[2], 0x22); + else glColor4b(col2[0], col2[1], col2[2], 0x22); glRectf(0, channel_y-CHANNELHEIGHT/2+4, frame1_x, channel_y+CHANNELHEIGHT/2-4); - if (conchan->flag & ACHAN_SELECTED) glColor4b(0x11, 0x22, 0x55, 0x44); - else glColor4b(0x55, 0x22, 0x11, 0x44); + if (conchan->flag & ACHAN_SELECTED) glColor4b(col1[0], col1[1], col1[2], 0x44); + else glColor4b(col2[0], col2[1], col2[2], 0x44); glRectf(frame1_x, channel_y-CHANNELHEIGHT/2+4, G.v2d->hor.xmax, channel_y+CHANNELHEIGHT/2-4); glDisable(GL_BLEND); @@ -508,6 +474,10 @@ static void draw_mesh_strips(SpaceAction *saction, Key *key) gla2DDrawInfo *di; float y, ybase; IpoCurve *icu; + char col1[3], col2[3]; + + BIF_GetThemeColor3ubv(TH_SHADE2, col2); + BIF_GetThemeColor3ubv(TH_HILITE, col1); if (!key->ipo) return; @@ -534,13 +504,13 @@ static void draw_mesh_strips(SpaceAction *saction, Key *key) * get a desaturated orange background */ glEnable(GL_BLEND); - glColor4b(0x55, 0x22, 0x11, 0x22); + glColor4b(col2[0], col2[1], col2[2], 0x22); glRectf(0, channel_y-CHANNELHEIGHT/2, frame1_x, channel_y+CHANNELHEIGHT/2); /* frames one and higher get a saturated orange background */ - glColor4b(0x55, 0x22, 0x11, 0x44); + glColor4b(col2[0], col2[1], col2[2], 0x44); glRectf(frame1_x, channel_y-CHANNELHEIGHT/2, G.v2d->hor.xmax, channel_y+CHANNELHEIGHT/2); glDisable(GL_BLEND); @@ -555,9 +525,9 @@ static void draw_mesh_strips(SpaceAction *saction, Key *key) void drawactionspace(ScrArea *sa, void *spacedata) { - short ofsx = 0, ofsy = 0; Key *key; + float col[3]; short maxymin; if (!G.saction) @@ -608,7 +578,8 @@ void drawactionspace(ScrArea *sa, void *spacedata) } } - glClearColor(.45, .45, .45, 0.0); + BIF_GetThemeColor3fv(TH_BACK, col); + glClearColor(col[0], col[1], col[2], 0.0); glClear(GL_COLOR_BUFFER_BIT); myortho2(G.v2d->cur.xmin, G.v2d->cur.xmax, G.v2d->cur.ymin, G.v2d->cur.ymax); diff --git a/source/blender/src/drawimage.c b/source/blender/src/drawimage.c index aa6e2228a0d..edfd5e30ded 100644 --- a/source/blender/src/drawimage.c +++ b/source/blender/src/drawimage.c @@ -69,6 +69,7 @@ #include "BIF_screen.h" #include "BIF_mywindow.h" #include "BIF_drawimage.h" +#include "BIF_resources.h" /* Modules used */ #include "mydevice.h" @@ -305,7 +306,6 @@ void draw_tfaces(void) TFace *tface; MFace *mface; Mesh *me; - unsigned int col; int a; glPointSize(2.0); @@ -335,7 +335,8 @@ void draw_tfaces(void) setlinestyle(2); /* colors: R=x G=y */ - if(tface->flag & TF_ACTIVE) cpack(0xFF00); else cpack(0xFFFFFF); + if(tface->flag & TF_ACTIVE) cpack(0xFF00); + else cpack(0xFFFFFF); glBegin(GL_LINE_STRIP); glVertex2fv( tface->uv[0] ); @@ -361,21 +362,21 @@ void draw_tfaces(void) glBegin(GL_POINTS); - if(tface->flag & TF_SEL1) col= 0x77FFFF; else col= 0xFF70FF; - cpack(col); + if(tface->flag & TF_SEL1) BIF_ThemeColor(TH_VERTEX_SELECT); + else BIF_ThemeColor(TH_VERTEX); glVertex2fv(tface->uv[0]); - if(tface->flag & TF_SEL2) col= 0x77FFFF; else col= 0xFF70FF; - cpack(col); + if(tface->flag & TF_SEL2) BIF_ThemeColor(TH_VERTEX_SELECT); + else BIF_ThemeColor(TH_VERTEX); glVertex2fv(tface->uv[1]); - if(tface->flag & TF_SEL3) col= 0x77FFFF; else col= 0xFF70FF; - cpack(col); + if(tface->flag & TF_SEL3) BIF_ThemeColor(TH_VERTEX_SELECT); + else BIF_ThemeColor(TH_VERTEX); glVertex2fv(tface->uv[2]); if(mface->v4) { - if(tface->flag & TF_SEL4) col= 0x77FFFF; else col= 0xFF70FF; - cpack(col); + if(tface->flag & TF_SEL4) BIF_ThemeColor(TH_VERTEX_SELECT); + else BIF_ThemeColor(TH_VERTEX); glVertex2fv(tface->uv[3]); } glEnd(); @@ -414,11 +415,13 @@ static unsigned int *get_part_from_ibuf(ImBuf *ibuf, short startx, short starty, void drawimagespace(ScrArea *sa, void *spacedata) { ImBuf *ibuf= NULL; + float col[3]; unsigned int *rect; int x1, y1, xmin, xmax, ymin, ymax; short sx, sy, dx, dy; - glClearColor(.1875, .1875, .1875, 0.0); + BIF_GetThemeColor3fv(TH_BACK, col); + glClearColor(col[0], col[1], col[2], 0.0); glClear(GL_COLOR_BUFFER_BIT); diff --git a/source/blender/src/drawimasel.c b/source/blender/src/drawimasel.c index 6c50b88585f..2e371bcda1f 100644 --- a/source/blender/src/drawimasel.c +++ b/source/blender/src/drawimasel.c @@ -54,6 +54,7 @@ #include "DNA_screen_types.h" #include "DNA_space_types.h" #include "BKE_global.h" + #include "BIF_fsmenu.h" #include "BIF_gl.h" #include "BIF_resources.h" @@ -62,6 +63,8 @@ #include "BIF_imasel.h" #include "BIF_mywindow.h" #include "BIF_space.h" +#include "BIF_resources.h" + #include "BSE_drawimasel.h" #include "BSE_filesel.h" @@ -430,11 +433,13 @@ void draw_sima_area(SpaceImaSel *simasel) uiBlock *block; OneSelectableIma *ima; ImaDir *direntry; + float col[3]; int i, info; short sx, sy, ex, ey, sc; char naam[256], infostr[256]; - glClearColor(0.4375, 0.4375, 0.4375, 0.0); + BIF_GetThemeColor3fv(TH_BACK, col); + glClearColor(col[0], col[1], col[2], 0.0); glClear(GL_COLOR_BUFFER_BIT); sprintf(naam, "win %d", curarea->win); @@ -443,7 +448,7 @@ void draw_sima_area(SpaceImaSel *simasel) if (simasel->desx > 0){ /* DIR ENTRYS */ - cpack(C_DERK); + BIF_ThemeColorShade(TH_SHADE1, -70); glRecti(simasel->dssx, simasel->dssy, simasel->dsex, simasel->dsey); glRecti(simasel->desx, simasel->desy, simasel->deex, simasel->deey); @@ -456,7 +461,7 @@ void draw_sima_area(SpaceImaSel *simasel) ex = simasel->dirsli_ex-2; ey = simasel->dirsli_ey-2; - cpack(C_BACK); + BIF_ThemeColor(TH_SHADE1); glRecti(sx, sy, ex, ey); uiEmboss(sx, sy, ex,ey,0); @@ -532,7 +537,7 @@ void draw_sima_area(SpaceImaSel *simasel) if (simasel->fesx > 0) { int extrabutsize; - cpack(C_DARK); + BIF_ThemeColorShade(TH_SHADE1, -80); glRecti(simasel->fssx, simasel->fssy, simasel->fsex, simasel->fsey); @@ -547,7 +552,7 @@ void draw_sima_area(SpaceImaSel *simasel) ex = simasel->imasli_ex; ey = simasel->imasli_ey; - cpack(C_BACK); + BIF_ThemeColor(TH_SHADE1); glRecti(sx, sy, ex, ey); uiEmboss(sx, sy, ex, ey, 1); @@ -589,7 +594,8 @@ void draw_sima_area(SpaceImaSel *simasel) sx = ima->sx; sy = ima->sy + sc; ex = ima->ex; ey = ima->ey + sc; - if (ima->anim == 0) cpack(C_DARK); else cpack(C_DERK); + if (ima->anim == 0) BIF_ThemeColorShade(TH_SHADE1, -80); + else BIF_ThemeColorShade(TH_SHADE1, -70); glRecti(sx, sy, ex, ey); uiEmboss(sx-1,sy-1, ex+1,ey+1, 1); @@ -628,9 +634,6 @@ void draw_sima_area(SpaceImaSel *simasel) ex = sx + 2*(ima->ex - ima->sx); ey = sy + 2*(ima->ey - ima->sy); - /* cpack(C_DERK); */ - /* uiEmboss(sx-8,sy-8, ex+8,ey+8, 1); */ - /* glRecti(sx-7, sy-7, ex+7, ey+7); */ uiEmboss(sx-1,sy-1, ex+1,ey+1, 0); if(OLD_IMASEL) { @@ -649,7 +652,7 @@ void draw_sima_area(SpaceImaSel *simasel) /* INFO */ if (simasel->infsx > 0){ - cpack(C_DARK); + BIF_ThemeColorShade(TH_SHADE1, -80); glRecti(simasel->infsx, simasel->infsy, simasel->infex, simasel->infey); uiEmboss(simasel->infsx, simasel->infsy, simasel->infex, simasel->infey,1); diff --git a/source/blender/src/drawipo.c b/source/blender/src/drawipo.c index 16cf0d4a36e..ca7a195ff34 100644 --- a/source/blender/src/drawipo.c +++ b/source/blender/src/drawipo.c @@ -1214,7 +1214,7 @@ static void draw_cfra(SpaceIpo *sipo) vec[0]*= G.scene->r.framelen; vec[1]= v2d->cur.ymin; - BIF_ThemeColor(TH_HILITE); + glColor3ub(0x60, 0xc0, 0x40); // no theme, should be global color once... glLineWidth(2.0); glBegin(GL_LINE_STRIP); diff --git a/source/blender/src/drawnla.c b/source/blender/src/drawnla.c index 65b9209ce32..fc36f1e1019 100644 --- a/source/blender/src/drawnla.c +++ b/source/blender/src/drawnla.c @@ -91,6 +91,7 @@ static void draw_nlatree(void) float x, y; bActionStrip *strip; bConstraintChannel *conchan; + float col[3]; myortho2(0, NLAWIDTH, G.v2d->cur.ymin, G.v2d->cur.ymax); // Scaling @@ -104,7 +105,8 @@ static void draw_nlatree(void) } } - glClearColor(.6, .6, .6, 0.0); + BIF_GetThemeColor3fv(TH_HEADER, col); + glClearColor(col[0], col[1], col[2], 0.0); glClear(GL_COLOR_BUFFER_BIT); /* Clip to the scrollable area */ @@ -120,14 +122,14 @@ static void draw_nlatree(void) for (base=G.scene->base.first; base; base=base->next){ if (nla_filter(base, 0)){ - cpack (0xAAAAAA); + BIF_ThemeColorShade(TH_HEADER, 20); glRectf(x, y-NLACHANNELHEIGHT/2, (float)NLAWIDTH, y+NLACHANNELHEIGHT/2); /* Draw the name / ipo timeline*/ if (TESTBASE_SAFE(base)) - cpack(0xFFFFFF); + BIF_ThemeColor(TH_TEXT_HI); else - cpack (0x000000); + BIF_ThemeColor(TH_TEXT); glRasterPos2f(x+16, y-4); BMF_DrawString(G.font, base->object->id.name+2); @@ -135,13 +137,13 @@ static void draw_nlatree(void) /* Draw the constraint ipos */ for (conchan = base->object->constraintChannels.first; conchan; conchan=conchan->next){ y-=NLACHANNELHEIGHT+NLACHANNELSKIP; - cpack (0x888888); + BIF_ThemeColorShade(TH_HEADER, -30); glRectf(x+16, y-NLACHANNELHEIGHT/2, (float)NLAWIDTH, y+NLACHANNELHEIGHT/2); if (conchan->flag & CONSTRAINT_CHANNEL_SELECT) - cpack(0xFFFFFF); + BIF_ThemeColor(TH_TEXT_HI); else - cpack (0x000000); + BIF_ThemeColor(TH_TEXT); glRasterPos2f(x+32, y-4); BMF_DrawString(G.font, conchan->name); @@ -154,13 +156,13 @@ static void draw_nlatree(void) y-=NLACHANNELHEIGHT+NLACHANNELSKIP; if (base->object->action){ - cpack (0x888888); + BIF_ThemeColorShade(TH_HEADER, -30); glRectf(x+16, y-NLACHANNELHEIGHT/2, (float)NLAWIDTH, y+NLACHANNELHEIGHT/2); if (TESTBASE_SAFE(base)) - cpack(0xFFFFFF); + BIF_ThemeColor(TH_TEXT_HI); else - cpack (0x000000); + BIF_ThemeColor(TH_TEXT); glRasterPos2f(x+32, y-4); BMF_DrawString(G.font, base->object->action->id.name+2); } @@ -170,13 +172,13 @@ static void draw_nlatree(void) /* Draw the nla strips */ if (base->object->type==OB_ARMATURE){ for (strip = base->object->nlastrips.first; strip; strip=strip->next){ - cpack (0x666666); + BIF_ThemeColorShade(TH_HEADER, -50); glRectf(x+32, y-NLACHANNELHEIGHT/2, (float)NLAWIDTH, y+NLACHANNELHEIGHT/2); if (TESTBASE_SAFE(base)) - cpack(0xFFFFFF); + BIF_ThemeColor(TH_TEXT_HI); else - cpack (0x000000); + BIF_ThemeColor(TH_TEXT); // why this test? check freeing mem when deleting strips? (ton) if(strip->act) { @@ -191,33 +193,6 @@ static void draw_nlatree(void) } myortho2(0, NLAWIDTH, 0, ( ofsy+G.v2d->mask.ymax)-( ofsy+G.v2d->mask.ymin-SCROLLB)); // Scaling - - glShadeModel(GL_SMOOTH); - - y=9; - -#if 1 - /* Draw sexy shaded block thingies */ - glEnable (GL_BLEND); - glBegin(GL_QUAD_STRIP); - glColor4ub (0x99,0x99,0x99,0x00); - glVertex2f (0,SCROLLB*2-y); - glVertex2f (NLAWIDTH,SCROLLB*2-y); - - glColor4ub (0x99,0x99,0x99,0xFF); - glVertex2f (0,SCROLLB-y); - glVertex2f (NLAWIDTH,SCROLLB-y); - - glColor4ub (0x99,0x99,0x99,0xFF); - glVertex2f (0,0-y); - glVertex2f (NLAWIDTH,0-y); - - glEnd(); - - glDisable (GL_BLEND); -#endif - - glShadeModel(GL_FLAT); } static void draw_nlastrips(SpaceNla *snla) @@ -226,8 +201,11 @@ static void draw_nlastrips(SpaceNla *snla) gla2DDrawInfo *di; Base *base; bConstraintChannel *conchan; - float y; + char col1[3], col2[3]; + + BIF_GetThemeColor3ubv(TH_SHADE2, col2); + BIF_GetThemeColor3ubv(TH_HILITE, col1); /* Draw strips */ @@ -251,18 +229,18 @@ static void draw_nlastrips(SpaceNla *snla) /* Draw the field */ glEnable (GL_BLEND); if (TESTBASE_SAFE(base)) - glColor4b (0x11, 0x22, 0x55, 0x22); + glColor4b (col1[0], col1[1], col1[2], 0x22); else - glColor4b (0x55, 0x22, 0x11, 0x22); + glColor4b (col2[0], col2[1], col2[2], 0x22); gla2DDrawTranslatePt(di, 1, y, &frame1_x, &channel_y); glRectf(0, channel_y-NLACHANNELHEIGHT/2, frame1_x, channel_y+NLACHANNELHEIGHT/2); if (TESTBASE_SAFE(base)) - glColor4b (0x11, 0x22, 0x55, 0x44); + glColor4b (col1[0], col1[1], col1[2], 0x44); else - glColor4b (0x55, 0x22, 0x11, 0x44); + glColor4b (col2[0], col2[1], col2[2], 0x44); glRectf(frame1_x, channel_y-NLACHANNELHEIGHT/2, G.v2d->hor.xmax, channel_y+NLACHANNELHEIGHT/2); glDisable (GL_BLEND); @@ -275,18 +253,18 @@ static void draw_nlastrips(SpaceNla *snla) for (conchan=ob->constraintChannels.first; conchan; conchan=conchan->next){ glEnable (GL_BLEND); if (conchan->flag & CONSTRAINT_CHANNEL_SELECT) - glColor4b (0x11, 0x22, 0x55, 0x22); + glColor4b (col1[0], col1[1], col1[2], 0x22); else - glColor4b (0x55, 0x22, 0x11, 0x22); + glColor4b (col2[0], col2[1], col2[2], 0x22); gla2DDrawTranslatePt(di, 1, y, &frame1_x, &channel_y); glRectf(0, channel_y-NLACHANNELHEIGHT/2+4, frame1_x, channel_y+NLACHANNELHEIGHT/2-4); if (conchan->flag & CONSTRAINT_CHANNEL_SELECT) - glColor4b (0x11, 0x22, 0x55, 0x44); + glColor4b (col1[0], col1[1], col1[2], 0x44); else - glColor4b (0x55, 0x22, 0x11, 0x44); + glColor4b (col2[0], col2[1], col2[2], 0x44); glRectf(frame1_x, channel_y-NLACHANNELHEIGHT/2+4, G.v2d->hor.xmax, channel_y+NLACHANNELHEIGHT/2-4); glDisable (GL_BLEND); @@ -307,17 +285,17 @@ static void draw_nlastrips(SpaceNla *snla) /* Draw the field */ glEnable (GL_BLEND); if (TESTBASE_SAFE(base)) - glColor4ub (0x11, 0x22, 0x55, 0x22); + glColor4ub (col1[0], col1[1], col1[2], 0x22); else - glColor4ub (0x55, 0x22, 0x11, 0x22); + glColor4ub (col2[0], col2[1], col2[2], 0x22); gla2DDrawTranslatePt(di, 1, y, &frame1_x, &channel_y); glRectf(0, channel_y-NLACHANNELHEIGHT/2+4, frame1_x, channel_y+NLACHANNELHEIGHT/2-4); if (TESTBASE_SAFE(base)) - glColor4ub (0x11, 0x22, 0x55, 0x44); + glColor4ub (col1[0], col1[1], col1[2], 0x44); else - glColor4ub (0x55, 0x22, 0x11, 0x44); + glColor4ub (col2[0], col2[1], col2[2], 0x44); glRectf(frame1_x, channel_y-NLACHANNELHEIGHT/2+4, G.v2d->hor.xmax, channel_y+NLACHANNELHEIGHT/2-4); glDisable (GL_BLEND); @@ -334,14 +312,14 @@ static void draw_nlastrips(SpaceNla *snla) for (strip=ob->nlastrips.first; strip; strip=strip->next){ int stripstart, stripend; int blendstart, blendend; - unsigned char r,g,b; + unsigned char r, g, b; /* Draw rect */ if (strip->flag & ACTSTRIP_SELECT){ - r = 0xFF; g=0xFF; b=0xAA; + r= 0xff; g= 0xff; b= 0xaa; } else{ - r = 0xE4; g=0x9C; b=0xC6; + r= 0xe4; g= 0x9c; b= 0xc6; } glColor4ub (r, g, b, 0xFF); @@ -431,6 +409,7 @@ static void draw_nlastrips(SpaceNla *snla) void drawnlaspace(ScrArea *sa, void *spacedata) { + float col[3]; short ofsx = 0, ofsy = 0; glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) ; @@ -446,7 +425,8 @@ void drawnlaspace(ScrArea *sa, void *spacedata) } } - glClearColor(.45, .45, .45, 0.0); + BIF_GetThemeColor3fv(TH_BACK, col); + glClearColor(col[0], col[1], col[2], 0.0); glClear(GL_COLOR_BUFFER_BIT); myortho2(G.v2d->cur.xmin, G.v2d->cur.xmax, G.v2d->cur.ymin, G.v2d->cur.ymax); diff --git a/source/blender/src/drawoops.c b/source/blender/src/drawoops.c index 8c955eb38d9..a0ea01ff770 100644 --- a/source/blender/src/drawoops.c +++ b/source/blender/src/drawoops.c @@ -66,6 +66,7 @@ #include "BIF_resources.h" #include "BIF_screen.h" #include "BIF_mywindow.h" +#include "BIF_resources.h" /* #include "BIF_drawoops.h" bad name :(*/ #include "BIF_oops.h" @@ -368,9 +369,11 @@ void draw_oops(Oops *oops) void drawoopsspace(ScrArea *sa, void *spacedata) { Oops *oops; + float col[3]; int ofsx, ofsy; - glClearColor(0.55, 0.55, 0.55, 0.0); + BIF_GetThemeColor3fv(TH_BACK, col); + glClearColor(col[0], col[1], col[2], 0.0); glClear(GL_COLOR_BUFFER_BIT); if(G.soops==0) return; diff --git a/source/blender/src/drawseq.c b/source/blender/src/drawseq.c index 76371a52e6d..d1c41eebc23 100644 --- a/source/blender/src/drawseq.c +++ b/source/blender/src/drawseq.c @@ -66,6 +66,7 @@ #include "BIF_drawseq.h" #include "BIF_editseq.h" #include "BIF_drawimage.h" +#include "BIF_resources.h" #include "BSE_view.h" #include "BSE_drawipo.h" @@ -495,7 +496,7 @@ static void draw_extra_seqinfo(void) xfac/= (float)(G.v2d->mask.xmax-G.v2d->mask.xmin); xco= G.v2d->cur.xmin+40*xfac; - cpack(0); + BIF_ThemeColor(TH_TEXT); /* NAME */ glRasterPos3f(xco, 0.3, 0.0); @@ -582,6 +583,7 @@ void drawseqspace(ScrArea *sa, void *spacedata) SpaceSeq *sseq; Editing *ed; Sequence *seq; + float col[3]; int ofsx, ofsy; ed= G.scene->ed; @@ -591,9 +593,10 @@ void drawseqspace(ScrArea *sa, void *spacedata) draw_image_seq(); return; } - - if(ed && ed->metastack.first) glClearColor(0.5, 0.5, 0.4, 0.0); - else glClearColor(.40625, .40625, .40625, 0.0); + + BIF_GetThemeColor3fv(TH_BACK, col); + if(ed && ed->metastack.first) glClearColor(col[0], col[1], col[2]-1.0, 0.0); + else glClearColor(col[0], col[1], col[2], 0.0); glClear(GL_COLOR_BUFFER_BIT); @@ -611,7 +614,7 @@ void drawseqspace(ScrArea *sa, void *spacedata) myortho2(G.v2d->cur.xmin, G.v2d->cur.xmax, G.v2d->cur.ymin, G.v2d->cur.ymax); - cpack(0x585858); + BIF_ThemeColorShade(TH_BACK, -20); glRectf(G.v2d->cur.xmin, 0.0, G.v2d->cur.xmax, 1.0); boundbox_seq(); diff --git a/source/blender/src/drawsound.c b/source/blender/src/drawsound.c index ba97b55e14c..a7acd3ba7dc 100644 --- a/source/blender/src/drawsound.c +++ b/source/blender/src/drawsound.c @@ -57,6 +57,7 @@ #include "BIF_mywindow.h" #include "BIF_screen.h" #include "BIF_editsound.h" +#include "BIF_resources.h" #include "BSE_drawipo.h" #include "BMF_Api.h" @@ -191,12 +192,13 @@ static void draw_cfra_sound(SpaceSound *ssound) } - void drawsoundspace(ScrArea *sa, void *spacedata) { + float col[3]; short ofsx, ofsy; - glClearColor(.6275, .6275, .6275, 0.0); + BIF_GetThemeColor3fv(TH_BACK, col); + glClearColor(col[0], col[1], col[2], 0.0); glClear(GL_COLOR_BUFFER_BIT); calc_scrollrcts(G.v2d, curarea->winx, curarea->winy); diff --git a/source/blender/src/drawtext.c b/source/blender/src/drawtext.c index e7667b64a54..daabbed64c9 100644 --- a/source/blender/src/drawtext.c +++ b/source/blender/src/drawtext.c @@ -77,6 +77,7 @@ #include "BIF_toolbox.h" #include "BIF_space.h" #include "BIF_mywindow.h" +#include "BIF_resources.h" #include "BSE_filesel.h" @@ -252,7 +253,7 @@ static void draw_cursor(SpaceText *st) { if (x) { h= txt_get_span(text->lines.first, text->curl) - st->top; - glColor3f(1.0, 0.0, 0.0); + BIF_ThemeColor(TH_HILITE); glRecti(x-1, curarea->winy-st->lheight*(h)-2, x+1, curarea->winy-st->lheight*(h+1)-2); } @@ -289,7 +290,7 @@ static void draw_cursor(SpaceText *st) { x= text_draw(st, linef->line, st->left, charf, 0, 0, 0); - glColor3f(0.75, 0.44, 0.44); + BIF_ThemeColor(TH_SHADE2); if(st->showlinenrs) { if (!x) x= TXT_OFFSET + TEXTXLOC -4; @@ -321,10 +322,7 @@ static void draw_cursor(SpaceText *st) { i= text_draw(st, linel->line, st->left, charl, 0, 0, 0); if(i) glRecti(x, curarea->winy-st->lheight*(h)-2, i, curarea->winy-st->lheight*(h+1)-2); -// draw cursor in selection -// h= txt_get_span(text->lines.first, text->curl) - st->top; -// glColor3f(1.0, 0.0, 0.0); -// glRecti(x2-1, curarea->winy-st->lheight*(h)-2, x2+1, curarea->winy-st->lheight*(h+1)-2); + } glColor3f(0.0, 0.0, 0.0); @@ -379,14 +377,14 @@ static void draw_textscroll(SpaceText *st) calc_text_rcts(st); - cpack(0x707070); + BIF_ThemeColorShade(TH_SHADE1, -20); glRecti(2, 2, 20, curarea->winy-6); uiEmboss(2, 2, 20, curarea->winy-6, 1); - cpack(0x909090); + BIF_ThemeColor(TH_SHADE1); glRecti(st->txtbar.xmin, st->txtbar.ymin, st->txtbar.xmax, st->txtbar.ymax); - cpack(0x7777c6); + BIF_ThemeColor(TH_SHADE2); glRecti(st->txtscroll.xmin, st->txtscroll.ymin, st->txtscroll.xmax, st->txtscroll.ymax); uiEmboss(st->txtbar.xmin, st->txtbar.ymin, st->txtbar.xmax, st->txtbar.ymax, st->flags & ST_SCROLL_SELECT); @@ -543,6 +541,7 @@ void drawtextspace(ScrArea *sa, void *spacedata) int i; TextLine *tmp; char linenr[12]; + float col[3]; int linecount = 0; if (BPY_spacetext_is_pywin(st)) { @@ -550,7 +549,8 @@ void drawtextspace(ScrArea *sa, void *spacedata) return; } - glClearColor(0.6, 0.6, 0.6, 1.0); + BIF_GetThemeColor3fv(TH_BACK, col); + glClearColor(col[0], col[1], col[2], 0.0); glClear(GL_COLOR_BUFFER_BIT); myortho2(-0.5, (float)(sa->winx)-.05, -0.5, (float)(sa->winy)-0.5); diff --git a/source/blender/src/editaction.c b/source/blender/src/editaction.c index b1850aeb0b3..29f701bffa9 100644 --- a/source/blender/src/editaction.c +++ b/source/blender/src/editaction.c @@ -2339,6 +2339,28 @@ void winqreadactionspace(ScrArea *sa, void *spacedata, BWinEvent *evt) } break; + case LEFTMOUSE: + if (mval[0]>ACTWIDTH){ + do { + getmouseco_areawin(mval); + + areamouseco_to_ipoco(G.v2d, mval, &dx, &dy); + + cfra= (int)dx; + if(cfra< 1) cfra= 1; + + if( cfra!=CFRA ) { + CFRA= cfra; + update_for_newframe(); + force_draw_plus(SPACE_VIEW3D); + force_draw_plus(SPACE_IPO); + force_draw_plus(SPACE_BUTS); + } + + } while(get_mbut()&L_MOUSE); + break; + } + /* no break here, we allow leftmouse click too */ case RIGHTMOUSE: /* Right clicking in the channel area selects the * channel or constraint channel @@ -2398,28 +2420,6 @@ void winqreadactionspace(ScrArea *sa, void *spacedata, BWinEvent *evt) } break; - case LEFTMOUSE: - if (mval[0]>ACTWIDTH){ - do { - getmouseco_areawin(mval); - - areamouseco_to_ipoco(G.v2d, mval, &dx, &dy); - - cfra= (int)dx; - if(cfra< 1) cfra= 1; - - if( cfra!=CFRA ) { - CFRA= cfra; - update_for_newframe(); - force_draw_plus(SPACE_VIEW3D); - force_draw_plus(SPACE_IPO); - force_draw_plus(SPACE_BUTS); - } - - } while(get_mbut()&L_MOUSE); - } - - break; case MIDDLEMOUSE: case WHEELUPMOUSE: case WHEELDOWNMOUSE: diff --git a/source/blender/src/editnla.c b/source/blender/src/editnla.c index da828399b42..b50ddd46dfe 100644 --- a/source/blender/src/editnla.c +++ b/source/blender/src/editnla.c @@ -183,16 +183,6 @@ void winqreadnlaspace(ScrArea *sa, void *spacedata, BWinEvent *evt) allqueue (REDRAWIPO, 0); } break; - case RIGHTMOUSE: - if (mval[0]>=NLAWIDTH) { - if(G.qual & LR_SHIFTKEY) - mouse_nla(SELECT_INVERT); - else - mouse_nla(SELECT_REPLACE); - } - else - mouse_nlachannels(mval); - break; case LEFTMOUSE: if (mval[0]>NLAWIDTH){ do { @@ -211,8 +201,18 @@ void winqreadnlaspace(ScrArea *sa, void *spacedata, BWinEvent *evt) } } while(get_mbut()&L_MOUSE); + break; } - + /* no break here, we allow leftmouse select */ + case RIGHTMOUSE: + if (mval[0]>=NLAWIDTH) { + if(G.qual & LR_SHIFTKEY) + mouse_nla(SELECT_INVERT); + else + mouse_nla(SELECT_REPLACE); + } + else + mouse_nlachannels(mval); break; case MIDDLEMOUSE: case WHEELUPMOUSE: diff --git a/source/blender/src/resources.c b/source/blender/src/resources.c index ecc0aee315c..7ed76746279 100644 --- a/source/blender/src/resources.c +++ b/source/blender/src/resources.c @@ -344,6 +344,33 @@ char *BIF_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) case SPACE_FILE: ts= &btheme->tfile; break; + case SPACE_NLA: + ts= &btheme->tnla; + break; + case SPACE_ACTION: + ts= &btheme->tact; + break; + case SPACE_SEQ: + ts= &btheme->tseq; + break; + case SPACE_IMAGE: + ts= &btheme->tima; + break; + case SPACE_IMASEL: + ts= &btheme->timasel; + break; + case SPACE_TEXT: + ts= &btheme->text; + break; + case SPACE_OOPS: + ts= &btheme->toops; + break; + case SPACE_SOUND: + ts= &btheme->tsnd; + break; + case SPACE_INFO: + ts= &btheme->tinfo; + break; default: ts= &btheme->tv3d; break; @@ -491,7 +518,7 @@ void BIF_InitTheme(void) SETCOL(btheme->tipo.shade2, 0x7f, 0x70, 0x70, 100); SETCOL(btheme->tipo.vertex, 0xff, 0x70, 0xff, 255); SETCOL(btheme->tipo.vertex_select, 0xff, 0xff, 0x70, 255); - SETCOL(btheme->tipo.hilite, 0x60, 0xc0, 0x40, 255); // green cfra line + SETCOL(btheme->tipo.hilite, 0x60, 0xc0, 0x40, 255); /* space file */ /* to have something initialized */ @@ -502,19 +529,66 @@ void BIF_InitTheme(void) SETCOL(btheme->tfile.header, 182, 182, 182, 255); SETCOL(btheme->tfile.hilite, 0xA0, 0xA0, 0xD0, 255); // selected files - btheme->tinfo= btheme->tv3d; - - btheme->tsnd= btheme->tv3d; - SETCOL(btheme->tsnd.grid,0x70, 0x70, 0x60, 255); + /* space action */ btheme->tact= btheme->tv3d; + SETCOL(btheme->tact.back, 153, 153, 153, 255); + SETCOL(btheme->tact.text, 0, 0, 0, 255); + SETCOL(btheme->tact.text_hi, 255, 255, 255, 255); + SETCOL(btheme->tact.header, 182, 182, 182, 255); + SETCOL(btheme->tact.grid, 94, 94, 94, 255); + SETCOL(btheme->tact.face, 140, 150, 160, 255); // RVK + SETCOL(btheme->tact.shade1, 140, 140, 140, 255); // sliders + SETCOL(btheme->tact.shade2, 0x55, 0x22, 0x11, 100); // bar + SETCOL(btheme->tact.hilite, 0x11, 0x22, 0x55, 100); // bar + + /* space nla */ btheme->tnla= btheme->tv3d; + SETCOL(btheme->tnla.back, 153, 153, 153, 255); + SETCOL(btheme->tnla.text, 0, 0, 0, 255); + SETCOL(btheme->tnla.text_hi, 255, 255, 255, 255); + SETCOL(btheme->tnla.header, 182, 182, 182, 255); + SETCOL(btheme->tnla.grid, 94, 94, 94, 255); + SETCOL(btheme->tnla.shade1, 140, 140, 140, 255); // sliders + SETCOL(btheme->tnla.shade2, 0x55, 0x22, 0x11, 100); // bar + SETCOL(btheme->tnla.hilite, 0x11, 0x22, 0x55, 100); // bar + + /* space seq */ btheme->tseq= btheme->tv3d; + SETCOL(btheme->tnla.back, 110, 110, 110, 255); + + /* space image */ btheme->tima= btheme->tv3d; + SETCOL(btheme->tima.back, 53, 53, 53, 255); + SETCOL(btheme->tima.vertex, 0xff, 0x70, 0xff, 255); + SETCOL(btheme->tima.vertex_select, 0xff, 0xff, 0x70, 255); + + /* space imageselect */ btheme->timasel= btheme->tv3d; + SETCOL(btheme->timasel.back, 110, 110, 110, 255); + SETCOL(btheme->timasel.shade1, 0xaa, 0xaa, 0xba, 255); + + /* space text */ btheme->text= btheme->tv3d; + SETCOL(btheme->text.back, 153, 153, 153, 255); + SETCOL(btheme->text.shade1, 143, 143, 143, 255); + SETCOL(btheme->text.shade2, 0xc6, 0x77, 0x77, 255); + SETCOL(btheme->text.hilite, 255, 0, 0, 255); + + /* space oops */ btheme->toops= btheme->tv3d; + SETCOL(btheme->toops.back, 140, 140, 140, 255); + + /* space info */ + btheme->tinfo= btheme->tv3d; + SETCOL(btheme->tinfo.back, 153, 153, 153, 255); + /* space sound */ + btheme->tsnd= btheme->tv3d; + SETCOL(btheme->tsnd.back, 158, 158, 158, 255); + SETCOL(btheme->tsnd.shade1, 140, 140, 140, 255); // sliders + SETCOL(btheme->tsnd.grid,0x70, 0x70, 0x60, 255); + } @@ -562,25 +636,50 @@ char *BIF_ThemeColorsPup(int spacetype) sprintf(str, "Vertex %%x%d|", TH_VERTEX); strcat(cp, str); sprintf(str, "Vertex Selected %%x%d|", TH_VERTEX_SELECT); strcat(cp, str); sprintf(str, "Vertex Size %%x%d|", TH_VERTEX_SIZE); strcat(cp, str); - //sprintf(str, "Edge %%x%d|", TH_EDGE); strcat(cp, str); sprintf(str, "Edge Selected %%x%d|", TH_EDGE_SELECT); strcat(cp, str); sprintf(str, "Face %%x%d|", TH_FACE); strcat(cp, str); - // last item without '|' sprintf(str, "Face Selected %%x%d", TH_FACE_SELECT); strcat(cp, str); } else if(spacetype==SPACE_IPO) { sprintf(str, "Panel %%x%d|", TH_PANEL); strcat(cp, str); strcat(cp,"%l|"); - sprintf(str, "Main Shade %%x%d|", TH_SHADE1); strcat(cp, str); - sprintf(str, "Alt Shade %%x%d|", TH_SHADE2); strcat(cp, str); + sprintf(str, "Window Sliders %%x%d|", TH_SHADE1); strcat(cp, str); + sprintf(str, "Buttons back %%x%d|", TH_SHADE2); strcat(cp, str); sprintf(str, "Vertex %%x%d|", TH_VERTEX); strcat(cp, str); sprintf(str, "Vertex Selected %%x%d|", TH_VERTEX_SELECT); strcat(cp, str); - sprintf(str, "Current frame %%x%d", TH_HILITE); strcat(cp, str); - // last item without '|' } else if(spacetype==SPACE_FILE) { sprintf(str, "Selected file %%x%d", TH_HILITE); strcat(cp, str); } + else if(spacetype==SPACE_NLA) { + //sprintf(str, "Panel %%x%d|", TH_PANEL); strcat(cp, str); + strcat(cp,"%l|"); + sprintf(str, "View Sliders %%x%d|", TH_SHADE1); strcat(cp, str); + sprintf(str, "Bars %%x%d|", TH_SHADE2); strcat(cp, str); + sprintf(str, "Bars selected %%x%d|", TH_HILITE); strcat(cp, str); + } + else if(spacetype==SPACE_ACTION) { + //sprintf(str, "Panel %%x%d|", TH_PANEL); strcat(cp, str); + strcat(cp,"%l|"); + sprintf(str, "RVK sliders %%x%d|", TH_FACE); strcat(cp, str); + sprintf(str, "View Sliders %%x%d|", TH_SHADE1); strcat(cp, str); + sprintf(str, "Bars %%x%d|", TH_SHADE2); strcat(cp, str); + sprintf(str, "Bars selected %%x%d|", TH_HILITE); strcat(cp, str); + } + else if(spacetype==SPACE_SEQ) { + sprintf(str, "Window sliders %%x%d|", TH_SHADE1); strcat(cp, str); + } + else if(spacetype==SPACE_SOUND) { + sprintf(str, "Window slider %%x%d|", TH_SHADE1); strcat(cp, str); + } + else if(spacetype==SPACE_IMASEL) { + sprintf(str, "Main Shade %%x%d|", TH_SHADE1); strcat(cp, str); + } + else if(spacetype==SPACE_TEXT) { + sprintf(str, "Scroll bar %%x%d|", TH_SHADE1); strcat(cp, str); + sprintf(str, "Selected text %%x%d|", TH_SHADE2); strcat(cp, str); + sprintf(str, "Cursor %%x%d|", TH_HILITE); strcat(cp, str); + } } return cp; } diff --git a/source/blender/src/space.c b/source/blender/src/space.c index f30ec98a46f..6c3b7ea82cd 100644 --- a/source/blender/src/space.c +++ b/source/blender/src/space.c @@ -1605,13 +1605,24 @@ void info_user_themebuts(uiBlock *block, short y1, short y2, short y3) uiDefBut(block, TEX, B_NAME_THEME, "", 255,y3,200,20, btheme->name, 1.0, 30.0, 0, 0, "Rename theme"); /* main choices pup */ - uiDefButS(block, MENU, B_CHANGE_THEME, "UI and Buttons %x1|3D View %x2|Ipo Window %x3|Buttons Window %x4|File Window %x5", + uiDefButS(block, MENU, B_CHANGE_THEME, "UI and Buttons %x1|3D View %x2|Ipo Curve Editor %x3|Action Editor %x4|" + "NLA Editor %x5|UV/Image Editor %x6|Sequence Editor %x7|Sound Editor %x8|Text Editor %x9|User Preferences %x10|" + "OOPS Schematic %x11|Buttons Window %x12|File Window %x13|Image Browser %x14", 255,y2,200,20, &curmain, 0, 0, 0, 0, "Specify theme for..."); if(curmain==1) spacetype= 0; else if(curmain==2) spacetype= SPACE_VIEW3D; else if(curmain==3) spacetype= SPACE_IPO; - else if(curmain==4) spacetype= SPACE_BUTS; - else if(curmain==5) spacetype= SPACE_FILE; + else if(curmain==4) spacetype= SPACE_ACTION; + else if(curmain==5) spacetype= SPACE_NLA; + else if(curmain==6) spacetype= SPACE_IMAGE; + else if(curmain==7) spacetype= SPACE_SEQ; + else if(curmain==8) spacetype= SPACE_SOUND; + else if(curmain==9) spacetype= SPACE_TEXT; + else if(curmain==10) spacetype= SPACE_INFO; + else if(curmain==11) spacetype= SPACE_OOPS; + else if(curmain==12) spacetype= SPACE_BUTS; + else if(curmain==13) spacetype= SPACE_FILE; + else if(curmain==14) spacetype= SPACE_IMASEL; else return; // only needed while coding... when adding themes for more windows /* color choices pup */ @@ -1660,7 +1671,7 @@ void info_user_themebuts(uiBlock *block, short y1, short y2, short y3) void drawinfospace(ScrArea *sa, void *spacedata) { uiBlock *block; - float fac; + float fac, col[3]; short xpos, ypos, ypostab, buth, rspace, dx, y1, y2, y3, y4, y2label, y3label, y4label; short smallprefbut, medprefbut, largeprefbut, smfileselbut; short edgespace, midspace; @@ -1668,7 +1679,8 @@ void drawinfospace(ScrArea *sa, void *spacedata) if(curarea->win==0) return; - glClearColor(0.6, 0.6, 0.6, 0.0); + BIF_GetThemeColor3fv(TH_BACK, col); + glClearColor(col[0], col[1], col[2], 0.0); glClear(GL_COLOR_BUFFER_BIT); fac= ((float)curarea->winx)/1280.0; |