]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/maplist.qc
add add all button in the UI
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / maplist.qc
index f7da843621a2dff999e2fc153391982e06a1ccf8..03431ba31ce277ea8b4a5f19939aeb8aaa061690 100644 (file)
@@ -295,6 +295,19 @@ void MapList_Remove_Shown(entity btn, entity me)
        me.refilter(me);
 }
 
+void MapList_Add_All(entity btn, entity me)
+{
+       // TODO make it work
+       float i, n;
+       n = strlen(me.g_maplistCache);
+       for (i = 0 ; i < n; i++)
+       {
+               if (!me.g_maplistCacheQuery(me, i))
+                       me.g_maplistCacheToggle(me, i);
+       }
+       me.refilter(me);
+}
+
 void MapList_Remove_All(entity btn, entity me)
 {
        cvar_set("g_maplist", "");