]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/playerlist.qc
Tidy up OO helpers
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / playerlist.qc
index d4dc5af05df05e60fa6eaec11eaa50ff45e85365..437206b881352bbd59cff5caade6eade963125a8 100644 (file)
@@ -1,5 +1,7 @@
-#ifdef INTERFACE
-CLASS(XonoticPlayerList) EXTENDS(XonoticListBox)
+#ifndef PLAYERLIST_H
+#define PLAYERLIST_H
+#include "listbox.qc"
+CLASS(XonoticPlayerList, XonoticListBox)
        ATTRIB(XonoticPlayerList, rowsPerItem, float, 1)
        METHOD(XonoticPlayerList, resizeNotify, void(entity, vector, vector, vector, vector))
        METHOD(XonoticPlayerList, drawListBoxItem, void(entity, float, vector, float))
@@ -30,7 +32,7 @@ const float PLAYERPARM_COUNT = 4;
 entity makeXonoticPlayerList()
 {
        entity me;
-       me = spawnXonoticPlayerList();
+       me = NEW(XonoticPlayerList);
        me.configureXonoticListBox(me);
        return me;
 }