void osdInitStyle() { AG_ColorsSetRGBA(WINDOW_BG_COLOR, 0, 0, 0, 200); AG_ColorsSetRGBA(TITLEBAR_FOCUSED_COLOR, 0, 128, 171, 250); AG_ColorsSetRGBA(TITLEBAR_UNFOCUSED_COLOR, 0, 128, 171, 200); AG_ColorsSetRGBA(BUTTON_COLOR, 0, 64, 85, 255); view.osdStyle = agStyleDefault; view.osdStyle.CheckboxButton = osdCheckbox; AG_SetStyle(agDriverSw, &view.osdStyle); }
/* Set the label text (format string). */ void AG_BoxSetLabelS(AG_Box *box, const char *s) { AG_ObjectLock(box); if (s != NULL) { if (box->lbl == NULL) { box->lbl = AG_LabelNewS(box, 0, s); AG_SetStyle(box->lbl, "font-size", "80%"); } else { AG_LabelTextS(box->lbl, s); } } else { AG_ObjectDetach(box->lbl); AG_ObjectDestroy(box->lbl); box->lbl = NULL; } AG_Redraw(box); AG_ObjectUnlock(box); }