- experiment: changed drawing style of Panels to minimal and fully

transparant.
- converted the Texture buttons, they're nice too!
This commit is contained in:
Ton Roosendaal 2003-10-13 14:57:43 +00:00
parent 5c2005cf06
commit ceb26d2a4e
10 changed files with 1186 additions and 1396 deletions

View File

@ -81,6 +81,8 @@ extern void world_panels(void);
extern void do_worldbuts(unsigned short event);
extern void radio_panels(void);
extern void do_radiobuts(unsigned short event);
extern void texture_panels(void);
extern void do_texbuts(unsigned short event);
/* logic */
extern void do_logic_buts(unsigned short event);

View File

@ -213,14 +213,10 @@
#define REDRAWBUTSSCENE 0x4017
#define REDRAWBUTSOBJECT 0x4018
#define REDRAWBUTSTYPES 0x4019
#define REDRAWBUTSSHADING 0x401A
#define REDRAWBUTSEDIT 0x401B
#define REDRAWBUTSSCRIPT 0x401C
#define REDRAWBUTSLOGIC 0x401D
/* can be in 2 places... */
#define REDRAWBUTSLAMP 0x401F
#define REDRAWBUTSEDIT 0x4019
#define REDRAWBUTSSCRIPT 0x401A
#define REDRAWBUTSLOGIC 0x401B
#define REDRAWBUTSSHADING 0x401C
#define REDRAWINFO 0x4021
#define RENDERPREVIEW 0x4022

View File

@ -260,7 +260,7 @@ void do_butspace(unsigned short event)
do_matbuts(event);
}
else if(event<=B_TEXBUTS) {
//do_texbuts(event);
do_texbuts(event);
}
else if(event<=B_ANIMBUTS) {
do_object_panels(event);
@ -410,7 +410,8 @@ void drawbutspace(ScrArea *sa, void *spacedata)
world_panels();
else if(tab==TAB_SHADING_RAD)
radio_panels();
else if(tab==TAB_SHADING_TEX)
texture_panels();
break;
case CONTEXT_EDITING:
@ -436,7 +437,7 @@ void drawbutspace(ScrArea *sa, void *spacedata)
/* when align changes, also do this for new panels */
/* don't always align, this function is called during AnmatePanels too */
if(sbuts->align)
if(sbuts->re_align || sbuts->mainbo!=sbuts->mainb)
if(sbuts->re_align || sbuts->mainbo!=sbuts->mainb || sbuts->tabo!=sbuts->tab[sbuts->mainb])
align= 1;
uiDrawBlocksPanels(sa, align);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -638,7 +638,7 @@ void editipo_changed(SpaceIpo *si, int doredraw)
else if(si->blocktype==ID_MA) allqueue(REDRAWBUTSSHADING, 0);
else if(si->blocktype==ID_WO) allqueue(REDRAWBUTSSHADING, 0);
else if(si->blocktype==ID_LA) allqueue(REDRAWBUTSLAMP, 0);
else if(si->blocktype==ID_LA) allqueue(REDRAWBUTSSHADING, 0);
// else if(si->blocktype==ID_SO) allqueue(REDRAWBUTSSOUND, 0);
else if(si->blocktype==ID_CA) {
allqueue(REDRAWBUTSEDIT, 0);

View File

@ -458,21 +458,6 @@ void buts_buttons(void)
if(tab==TAB_SHADING_MAT) {
}
else if(tab==TAB_SHADING_TEX) {
if(G.buts->texfrom==0) {
if(idfrom) {
xco= std_libbuttons(block, xco, 0, 0, NULL, B_TEXBROWSE, id, idfrom, &(G.buts->texnr), B_TEXALONE, B_TEXLOCAL, B_TEXDELETE, B_AUTOTEXNAME, B_KEEPDATA);
}
}
else if(G.buts->texfrom==1) {
if(idfrom) {
xco= std_libbuttons(block, xco, 0, 0, NULL, B_WTEXBROWSE, id, idfrom, &(G.buts->texnr), B_TEXALONE, B_TEXLOCAL, B_TEXDELETE, B_AUTOTEXNAME, B_KEEPDATA);
}
}
else if(G.buts->texfrom==2) {
if(idfrom) {
xco= std_libbuttons(block, xco, 0, 0, NULL, B_LTEXBROWSE, id, idfrom, &(G.buts->texnr), B_TEXALONE, B_TEXLOCAL, B_TEXDELETE, B_AUTOTEXNAME, B_KEEPDATA);
}
}
}
else if(tab==TAB_SHADING_LAMP) {
if(id) {

View File

@ -1065,7 +1065,7 @@ void do_global_buttons(unsigned short event)
else if(ipo->blocktype==ID_LA) {
( (Lamp *)from)->ipo= ipo;
id_us_plus(idtest);
allqueue(REDRAWBUTSLAMP, 0);
allqueue(REDRAWBUTSSHADING, 0);
}
else if(ipo->blocktype==ID_CA) {
( (Camera *)from)->ipo= ipo;
@ -1257,7 +1257,7 @@ void do_global_buttons(unsigned short event)
if(id) id->us--;
allqueue(REDRAWBUTSHEAD, 0);
allqueue(REDRAWBUTSLAMP, 0);
allqueue(REDRAWBUTSSHADING, 0);
allqueue(REDRAWVIEW3D, 0);
allqueue(REDRAWIPO, 0);
BIF_preview_changed(G.buts);
@ -1315,7 +1315,6 @@ void do_global_buttons(unsigned short event)
allqueue(REDRAWBUTSHEAD, 0);
allqueue(REDRAWBUTSSHADING, 0);
allqueue(REDRAWBUTSLAMP, 0);
allqueue(REDRAWIPO, 0);
BIF_preview_changed(G.buts);
}
@ -1336,7 +1335,6 @@ void do_global_buttons(unsigned short event)
if(G.buts->mainb==CONTEXT_SHADING) {
if(G.buts->tab[CONTEXT_SHADING]==TAB_SHADING_TEX) {
autotexname(G.buts->lockpoin);
allqueue(REDRAWBUTSHEAD, 0);
allqueue(REDRAWBUTSSHADING, 0);
}
else if(G.buts->tab[CONTEXT_SHADING]==TAB_SHADING_MAT) {
@ -1352,7 +1350,7 @@ void do_global_buttons(unsigned short event)
else if(G.buts->tab[CONTEXT_SHADING]==TAB_SHADING_LAMP) {
la= G.buts->lockpoin;
if(la->mtex[ la->texact]) autotexname(la->mtex[la->texact]->tex);
allqueue(REDRAWBUTSLAMP, 0);
allqueue(REDRAWBUTSSHADING, 0);
}
}
break;

View File

@ -6167,12 +6167,12 @@ int uiNewPanel(ScrArea *sa, uiBlock *block, char *panelname, char *tabname, int
block->panel= pa;
pa->active= 1;
if(block->panel->paneltab) return 0;
if(block->panel->flag & PNL_CLOSED) return 0;
/* clear global */
panel_tabbed= group_tabbed= NULL;
if(block->panel->paneltab) return 0;
if(block->panel->flag & PNL_CLOSED) return 0;
return 1;
}
@ -6404,7 +6404,7 @@ static void ui_draw_panel_header(uiBlock *block)
/* active tab */
uiSetRoundBox(15);
glColor3ub(140, 140, 147);
uiRoundBox(PNL_ICON+a*width, panel->sizey+3, PNL_ICON+(a+1)*width, panel->sizey+PNL_HEADER-3, 8);
uiRoundBox(2+PNL_ICON+a*width, panel->sizey+3, PNL_ICON+(a+1)*width, panel->sizey+PNL_HEADER-3, 8);
glColor3ub(255,255,255);
glRasterPos2f(10+PNL_ICON+a*width, panel->sizey+5);
@ -6458,18 +6458,21 @@ static void ui_draw_panel(uiBlock *block)
else {
uiSetRoundBox(3);
glColor3ub(160, 160, 167);
uiRoundBox(block->minx, block->maxy, block->maxx, block->maxy+PNL_HEADER, 10);
//glColor3ub(160, 160, 167);
//uiRoundBox(block->minx, block->maxy, block->maxx, block->maxy+PNL_HEADER, 10);
glColor3ub(218, 218, 218);
uiRoundRect(block->minx, block->miny, block->maxx, block->maxy+PNL_HEADER, 10);
glColor3ub(198, 198, 198);
glRectf(block->minx, block->miny, block->maxx, block->maxy);
//glRectf(block->minx, block->miny, block->maxx, block->maxy);
if(G.buts->align) {
glColor3ub(206, 206, 206);
if(G.buts->align==BUT_HORIZONTAL) ui_set_panel_pattern('h');
else ui_set_panel_pattern('v');
glRectf(block->minx, block->miny, block->maxx, block->maxy);
//glRectf(block->minx, block->miny, block->maxx, block->maxy);
glDisable(GL_POLYGON_STIPPLE);
}

View File

@ -3287,17 +3287,6 @@ void allqueue(unsigned short event, short val)
}
}
break;
case REDRAWBUTSLAMP:
if(sa->spacetype==SPACE_BUTS) {
buts= sa->spacedata.first;
if(buts->mainb==CONTEXT_SHADING) {
buts->re_align= 1;
scrarea_queue_winredraw(sa);
scrarea_queue_headredraw(sa);
}
}
break;
case REDRAWDATASELECT:
if(sa->spacetype==SPACE_FILE) {