X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fmenu%2Fxonotic%2Fplayerlist.qc;h=c6033050ae6f45d9157b042039788773b67afa72;hb=ae277921268b84c7b7ee5ab901ce7f0088c07605;hp=db3ac8a207aae1b99524a3cc11c1aa40adfed1f1;hpb=cf4d36d9d295ce940e9e9bdf7a711e4036de0b3c;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/menu/xonotic/playerlist.qc b/qcsrc/menu/xonotic/playerlist.qc index db3ac8a20..c6033050a 100644 --- a/qcsrc/menu/xonotic/playerlist.qc +++ b/qcsrc/menu/xonotic/playerlist.qc @@ -1,27 +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) -ENDCLASS(XonoticPlayerList) -entity makeXonoticPlayerList(); -#endif - -#ifdef IMPLEMENTATION +#include "playerlist.qh" + +.float realUpperMargin2; const float PLAYERPARM_SCORE = 0; const float PLAYERPARM_PING = 1; @@ -127,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"); } @@ -137,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