X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fmenu%2Fxonotic%2Fplayerlist.qc;h=c6033050ae6f45d9157b042039788773b67afa72;hb=fcd31ea01083f448ef36785ad0bdb4244927fa42;hp=9ba5d8738df886d573a560e16a5e74943cad1035;hpb=7bae88d09fbd53cce732e31633aea92671b43699;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/menu/xonotic/playerlist.qc b/qcsrc/menu/xonotic/playerlist.qc index 9ba5d8738..c6033050a 100644 --- a/qcsrc/menu/xonotic/playerlist.qc +++ b/qcsrc/menu/xonotic/playerlist.qc @@ -1,28 +1,6 @@ -#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, int, vector, bool, bool)); - ATTRIB(XonoticPlayerList, allowFocusSound, float, 0) - ATTRIB(XonoticPlayerList, realFontSize, vector, '0 0 0') - ATTRIB(XonoticPlayerList, columnNameOrigin, float, 0) - ATTRIB(XonoticPlayerList, columnNameSize, float, 0) - ATTRIB(XonoticPlayerList, columnScoreOrigin, float, 0) - ATTRIB(XonoticPlayerList, columnScoreSize, float, 0) - ATTRIB(XonoticPlayerList, realUpperMargin, float, 0) - ATTRIB(XonoticPlayerList, origin, vector, '0 0 0') - ATTRIB(XonoticPlayerList, itemAbsSize, vector, '0 0 0') - METHOD(XonoticPlayerList, setPlayerList, void(entity, string)); - METHOD(XonoticPlayerList, getPlayerList, string(entity, float, float)); - ATTRIB(XonoticPlayerList, playerList, float, -1) - ATTRIB(XonoticPlayerList, selectionDoesntMatter, bool, true) -ENDCLASS(XonoticPlayerList) -entity makeXonoticPlayerList(); -#endif - -#ifdef IMPLEMENTATION +#include "playerlist.qh" + +.float realUpperMargin2; const float PLAYERPARM_SCORE = 0; const float PLAYERPARM_PING = 1; @@ -128,7 +106,7 @@ void XonoticPlayerList_drawListBoxItem(entity me, int i, vector absSize, bool is if((t = strstrofs(score, ",", 0)) >= 0) score = substring(score, 0, t); - if(stof(score) == -666) + if(stof(score) == FRAGS_SPECTATOR) score = _("spectator"); } @@ -138,5 +116,3 @@ void XonoticPlayerList_drawListBoxItem(entity me, int i, vector absSize, bool is score = draw_TextShortenToWidth(score, me.columnScoreSize, 0, me.realFontSize); draw_Text(me.realUpperMargin2 * eY + (me.columnScoreOrigin + 1.00 * (me.columnScoreSize - draw_TextWidth(score, 1, me.realFontSize))) * eX, score, me.realFontSize, rgb, 1, 0); } - -#endif