]> 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 1facda299b3ddaa58ea288723f7c0f25bebf39a4..437206b881352bbd59cff5caade6eade963125a8 100644 (file)
@@ -1,8 +1,11 @@
-#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))
+       ATTRIB(XonoticPlayerList, allowFocusSound, float, 0)
        ATTRIB(XonoticPlayerList, realFontSize, vector, '0 0 0')
        ATTRIB(XonoticPlayerList, columnNameOrigin, float, 0)
        ATTRIB(XonoticPlayerList, columnNameSize, float, 0)
@@ -29,14 +32,14 @@ const float PLAYERPARM_COUNT = 4;
 entity makeXonoticPlayerList()
 {
        entity me;
-       me = spawnXonoticPlayerList();
+       me = NEW(XonoticPlayerList);
        me.configureXonoticListBox(me);
        return me;
 }
 
 void XonoticPlayerList_setPlayerList(entity me, string plist)
 {
-       float buf,i,n;
+       int buf,i,n;
        string s;
 
        buf = buf_create();