Add custom description of demos

Custom description is displayed in "Watching demo" and "Play demo" menu.
This commit is contained in:
aurhat
2014-11-29 16:06:50 +01:00
parent a957ae497e
commit fa483e1fcd
3 changed files with 19 additions and 2 deletions
+8 -1
View File
@@ -1478,7 +1478,14 @@ void writecfg()
writebinds(f);
f->printf("\n// aliases\n\n");
enumerate(*idents, ident, id,
if(id.type==ID_ALIAS && id.persist && id.action[0])
if(id.type==ID_ALIAS && id.persist && id.action[0] && strncmp(id.name, "demodesc_", 9))
{
f->printf("%s = [%s]\n", id.name, id.action);
}
);
f->printf("\n// demo descriptions\n\n");
enumerate(*idents, ident, id,
if(id.type==ID_ALIAS && id.persist && id.action[0] && !strncmp(id.name, "demodesc_", 9) && id.action)
{
f->printf("%s = [%s]\n", id.name, id.action);
}