static void rmdsSelect(void * /* dummy */) { char *name; tDrvElt *curDrv; int index; sprintf(buf, "%s", RM_SECT_DRIVERS); GfParmListClean(ds->param, buf); name = GfuiScrollListExtractElement(scrHandle, selectedScrollList, 0, (void**)&curDrv); index = 1; while (name != NULL) { sprintf(buf, "%s/%d", RM_SECT_DRIVERS, index); GfParmSetNum(ds->param, buf, RM_ATTR_IDX, (char*)NULL, curDrv->index); GfParmSetStr(ds->param, buf, RM_ATTR_MODULE, curDrv->dname); index++; name = GfuiScrollListExtractElement(scrHandle, selectedScrollList, 0, (void**)&curDrv); } rmdsDeactivate(ds->nextScreen); }
/* Update players scroll-list from PlayersInfo array */ static void UpdtScrollList(void) { const char *str; int i; void *tmp; /* free the previous scrollist elements */ while((str = GfuiScrollListExtractElement(ScrHandle, ScrollList, 0, (void**)&tmp)) != NULL) { } for (i = 0; i < (int)PlayersInfo.size(); i++) { GfuiScrollListInsertElement(ScrHandle, ScrollList, PlayersInfo[i]->dispName(), i, (void*)(long)i); } if (CurrPlayer != PlayersInfo.end()) { GfuiScrollListShowElement(ScrHandle, ScrollList, (int)(CurrPlayer - PlayersInfo.begin())); } }