r2351 - in branches/nexuiz-2.0/data: menu qcsrc/menu/base qcsrc/menu/custom
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Thu Apr 19 09:47:59 EDT 2007
Author: esteel
Date: 2007-04-19 09:47:59 -0400 (Thu, 19 Apr 2007)
New Revision: 2351
Modified:
branches/nexuiz-2.0/data/menu/joingame.menu
branches/nexuiz-2.0/data/qcsrc/menu/base/hostcache.qc
branches/nexuiz-2.0/data/qcsrc/menu/base/hostcache.qh
branches/nexuiz-2.0/data/qcsrc/menu/custom/joingame.qc
branches/nexuiz-2.0/data/qcsrc/menu/custom/joingame.qm
Log:
from trunk: join menu now displays human player count
Modified: branches/nexuiz-2.0/data/menu/joingame.menu
===================================================================
--- branches/nexuiz-2.0/data/menu/joingame.menu 2007-04-19 13:34:34 UTC (rev 2350)
+++ branches/nexuiz-2.0/data/menu/joingame.menu 2007-04-19 13:47:59 UTC (rev 2351)
@@ -23,9 +23,9 @@
origin '460 44'
#define SList_Ping '50 15'
- #define SList_Name '467 15'
+ #define SList_Name '442 15'
#define SList_Map '120 15'
- #define SList_Players '70 15'
+ #define SList_Players '95 15'
#define SList_Mod '90 15'
#define SList_Direction '2 0'
@@ -99,17 +99,28 @@
direction '0.001 0 0'
flag [FlagEmbedded]
- Derive TextButton NumPlayers
+ Derive TextButton NumHumans
{
normal "NP"
init Nex_Action_JoinGame_SortBy
- target "numplayers"
+ target "numhumans"
}
Derive Label Slash
{
text "/"
}
+ Derive TextButton NumPlayers
+ {
+ normal "TP"
+
+ init Nex_Action_JoinGame_SortBy
+ target "numplayers"
+ }
+ Derive Label Slash2
+ {
+ text "/"
+ }
Derive TextButton MaxPlayers
{
normal "MP"
@@ -166,13 +177,13 @@
}
DeriveTemplate Nex_HostCache_StringField Map
{
- pos '519 0'
+ pos '494 0'
size [SList_Map]
target "map"
}
DeriveTemplate Nex_HostCache_Players Players
{
- pos '641 0'
+ pos '616 0'
size [SList_Players]
}
DeriveTemplate Nex_HostCache_StringField Mod
Modified: branches/nexuiz-2.0/data/qcsrc/menu/base/hostcache.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/base/hostcache.qc 2007-04-19 13:34:34 UTC (rev 2350)
+++ branches/nexuiz-2.0/data/qcsrc/menu/base/hostcache.qc 2007-04-19 13:47:59 UTC (rev 2351)
@@ -11,6 +11,7 @@
SLIST_FIELD_NAME = gethostcacheindexforkey( "name" );
SLIST_FIELD_MAXPLAYERS = gethostcacheindexforkey( "maxplayers" );
SLIST_FIELD_NUMPLAYERS = gethostcacheindexforkey( "numplayers" );
+ SLIST_FIELD_NUMHUMANS = gethostcacheindexforkey( "numhumans" );
SLIST_FIELD_PROTOCOL = gethostcacheindexforkey( "protocol" );
};
Modified: branches/nexuiz-2.0/data/qcsrc/menu/base/hostcache.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/base/hostcache.qh 2007-04-19 13:34:34 UTC (rev 2350)
+++ branches/nexuiz-2.0/data/qcsrc/menu/base/hostcache.qh 2007-04-19 13:47:59 UTC (rev 2351)
@@ -9,6 +9,7 @@
float SLIST_FIELD_NAME;
float SLIST_FIELD_MAXPLAYERS;
float SLIST_FIELD_NUMPLAYERS;
+float SLIST_FIELD_NUMHUMANS;
float SLIST_FIELD_PROTOCOL;
float HostCache_ViewCount;
Modified: branches/nexuiz-2.0/data/qcsrc/menu/custom/joingame.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/custom/joingame.qc 2007-04-19 13:34:34 UTC (rev 2350)
+++ branches/nexuiz-2.0/data/qcsrc/menu/custom/joingame.qc 2007-04-19 13:47:59 UTC (rev 2351)
@@ -93,14 +93,17 @@
void() Item_Nex_HostCache_Players_Update =
{
- local string lNum, lMax;
+ local string lHum, lNum, lMax;
+ local float lHumans;
if( HostCache_ViewCount <= self._parent.stepValue )
return;
+ lHumans = gethostcachenumber( SLIST_FIELD_NUMHUMANS, self._parent.stepValue );
+ if (lHumans >= 0) lHum = ftos( lHumans ); else lHum = "?";
lNum = ftos( gethostcachenumber( SLIST_FIELD_NUMPLAYERS, self._parent.stepValue ) );
lMax = ftos( gethostcachenumber( SLIST_FIELD_MAXPLAYERS, self._parent.stepValue ) );
- String_EntitySet( self, text, strcat( lNum, "/", lMax ) );
+ String_EntitySet( self, text, strcat( lHum, "/", lNum, "/", lMax ) );
Item_Label_Update();
};
Modified: branches/nexuiz-2.0/data/qcsrc/menu/custom/joingame.qm
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/custom/joingame.qm 2007-04-19 13:34:34 UTC (rev 2350)
+++ branches/nexuiz-2.0/data/qcsrc/menu/custom/joingame.qm 2007-04-19 13:47:59 UTC (rev 2351)
@@ -170,6 +170,10 @@
lField = SLIST_FIELD_NUMPLAYERS;
lIsStringArg = false;
}
+ else if( lToken == "numhumans" ) {
+ lField = SLIST_FIELD_NUMHUMANS;
+ lIsStringArg = false;
+ }
else if( lToken == "protocol" ) {
lField = SLIST_FIELD_PROTOCOL;
lIsStringArg = false;
More information about the nexuiz-commits
mailing list