struct label {
char * text;
int length;
+ int cs;
};
static void labelDraw(newtComponent co);
la->length = strlen(text);
la->text = strdup(text);
+ la->cs = COLORSET_LABEL;
return co;
}
labelDraw(co);
}
+void newtLabelSetColors(newtComponent co, int colorset) {
+ struct label * la = co->data;
+
+ la->cs = colorset;
+ labelDraw(co);
+}
+
static void labelDraw(newtComponent co) {
struct label * la = co->data;
if (!co->isMapped) return;
- SLsmg_set_color(COLORSET_LABEL);
+ SLsmg_set_color(la->cs);
newtGotorc(co->top, co->left);
SLsmg_write_string(la->text);