fixed minor text color issue.

This commit is contained in:
2003-05-13 10:34:33 +00:00
parent 060f1b068d
commit d40cb3da9f
2 changed files with 29 additions and 8 deletions

View File

@@ -6423,6 +6423,16 @@ static char *imagetype_pup(void)
} }
static char *avicodec_str(void)
{
static char string[1024];
sprintf(string, "Codec: %s", G.scene->r.avicodecdata->avicodecname);
return string;
}
void renderbuts(void) void renderbuts(void)
{ {
ID *id; ID *id;
@@ -6577,10 +6587,12 @@ void renderbuts(void)
if(G.scene->r.imtype == R_QUICKTIME) { if(G.scene->r.imtype == R_QUICKTIME) {
#ifdef WITH_QUICKTIME #ifdef WITH_QUICKTIME
#if defined (_WIN32) || defined (__APPLE__) #if defined (_WIN32) || defined (__APPLE__)
glColor3f(0.65, 0.65, 0.7);
glRecti(892,yofs+46,892+225,yofs+45+20);
if(!have_qtcodec) if(!have_qtcodec)
uiDefBut(block, LABEL, 0, "Codec: not set", 892,yofs+42,225,20, 0, 0, 0, 0, 0, ""); uiDefBut(block, LABEL, 0, "Codec: not set", 892,yofs+44,225,20, 0, 0, 0, 0, 0, "");
else else
uiDefBut(block, LABEL, 0, qtcdname, 892,yofs+42,225,20, 0, 0, 0, 0, 0, ""); uiDefBut(block, LABEL, 0, qtcdname, 892,yofs+44,225,20, 0, 0, 0, 0, 0, "");
uiDefBut(block, BUT,B_SELECTCODEC, "Set codec", 892,yofs,112,20, 0, 0, 0, 0, 0, "Set codec settings for Quicktime"); uiDefBut(block, BUT,B_SELECTCODEC, "Set codec", 892,yofs,112,20, 0, 0, 0, 0, 0, "Set codec settings for Quicktime");
#else /* libquicktime */ #else /* libquicktime */
if (!G.scene->r.qtcodecdata) G.scene->r.qtcodecdata = MEM_callocN(sizeof(QtCodecData), "QtCodecData"); if (!G.scene->r.qtcodecdata) G.scene->r.qtcodecdata = MEM_callocN(sizeof(QtCodecData), "QtCodecData");
@@ -6600,10 +6612,12 @@ void renderbuts(void)
#endif /* WITH_QUICKTIME */ #endif /* WITH_QUICKTIME */
} else { } else {
#ifdef _WIN32 #ifdef _WIN32
glColor3f(0.65, 0.65, 0.7);
glRecti(892,yofs+46,892+225,yofs+45+20);
if(G.scene->r.avicodecdata == NULL) if(G.scene->r.avicodecdata == NULL)
uiDefBut(block, LABEL, 0, "Codec: not set.", 892,yofs+42,225,20, 0, 0, 0, 0, 0, ""); uiDefBut(block, LABEL, 0, "Codec: not set.", 892,yofs+43,225,20, 0, 0, 0, 0, 0, "");
else else
uiDefBut(block, LABEL, 0, G.scene->r.avicodecdata->avicodecname, 892,yofs+42,225,20, 0, 0, 0, 0, 0, ""); uiDefBut(block, LABEL, 0, avicodec_str(), 892,yofs+43,225,20, 0, 0, 0, 0, 0, "");
#endif #endif
uiDefBut(block, BUT,B_SELECTCODEC, "Set codec", 892,yofs,112,20, 0, 0, 0, 0, 0, "Set codec settings for AVI"); uiDefBut(block, BUT,B_SELECTCODEC, "Set codec", 892,yofs,112,20, 0, 0, 0, 0, 0, "Set codec settings for AVI");
} }

View File

@@ -920,6 +920,7 @@ static void ui_draw_but_BUTM(uiBut *but)
float x; float x;
short len; short len;
char *cpoin; char *cpoin;
int sel;
but->embossfunc(but->col, but->aspect, but->x1, but->y1, but->x2, but->y2, but->flag); but->embossfunc(but->col, but->aspect, but->x1, but->y1, but->x2, but->y2, but->flag);
@@ -930,11 +931,17 @@ static void ui_draw_but_BUTM(uiBut *but)
if(cpoin) *cpoin= 0; if(cpoin) *cpoin= 0;
if(but->embossfunc==ui_emboss_P) { if(but->embossfunc==ui_emboss_P) {
if(but->flag & UI_ACTIVE) glColor3ub(255,255,255); if(but->flag & UI_ACTIVE) {
else glColor3ub(0,0,0); glColor3ub(255,255,255);
sel = 1;
} else {
glColor3ub(0,0,0);
sel = 0;
}
} }
else { else {
glColor3ub(0,0,0); glColor3ub(0,0,0);
sel = 0;
} }
/* If there's an icon too (made with uiDefIconTextBut) then draw the icon /* If there's an icon too (made with uiDefIconTextBut) then draw the icon
@@ -953,10 +960,10 @@ static void ui_draw_but_BUTM(uiBut *but)
#ifdef INTERNATIONAL #ifdef INTERNATIONAL
if(G.ui_international == TRUE) { if(G.ui_international == TRUE) {
if(U.transopts & TR_BUTTONS) { // BUTTON TEXTS if(U.transopts & TR_BUTTONS) { // BUTTON TEXTS
FTF_DrawString(but->drawstr, FTF_USE_GETTEXT | FTF_INPUT_UTF8, but->flag & UI_ACTIVE); FTF_DrawString(but->drawstr, FTF_USE_GETTEXT | FTF_INPUT_UTF8, sel);
} }
else { else {
FTF_DrawString(but->drawstr, FTF_NO_TRANSCONV | FTF_INPUT_UTF8, but->flag & UI_ACTIVE); FTF_DrawString(but->drawstr, FTF_NO_TRANSCONV | FTF_INPUT_UTF8, sel);
} }
} }
else { else {