Example #1
0
/* Set the label text (C string). */
void
AG_ButtonTextS(AG_Button *bu, const char *label)
{
	AG_ObjectLock(bu);
	if (bu->surface != -1) {
		AG_ButtonSurface(bu, NULL);
	}
	if (bu->lbl == NULL) {
		bu->lbl = AG_LabelNewS(bu, 0, label);
		AG_LabelJustify(bu->lbl, bu->justify);
		AG_LabelValign(bu->lbl, bu->valign);
	} else {
		AG_LabelTextS(bu->lbl, label);
	}
	AG_ObjectUnlock(bu);
	AG_Redraw(bu);
}
Example #2
0
File: combo.c Project: adsr/agar
void
AG_ComboSetButtonSurface(AG_Combo *com, AG_Surface *su)
{
	AG_ButtonSurface(com->button, su);
}