Release 25 UI

This commit is contained in:
Bryce Hutchings 2001-12-17 15:01:02 +00:00
parent 7ad6e28bb3
commit f3fbe78e9c
2 changed files with 20 additions and 17 deletions

View file

@ -87,11 +87,11 @@ void UI_CheckKickCvar( void ) {
trap_Cvar_VariableStringBuffer("RQ3_CvarKickReason", Cvar, sizeof(Cvar));
if (strlen(Cvar)) {
Com_Printf("AHAH!: [%s]\n", Cvar);
trap_Cvar_Set("RQ3_CvarKickReason", "");
strcat(Reason, Cvar);
strcat(Reason, " is out of range.");
s_main.rq3_kicktext.string = Reason;
Com_Printf("%s\n", Reason);
}
else {
s_main.rq3_kicktext.string = "";

View file

@ -22,13 +22,13 @@
static char* playermodel_artlist[] =
{
MODEL_BACK0,
MODEL_BACK1,
MODEL_BACK0,
MODEL_BACK1,
MODEL_SELECT,
MODEL_SELECTED,
//MODEL_FRAMEL,
//MODEL_FRAMER,
//MODEL_PORTS,
//MODEL_PORTS,
MODEL_ARROWS,
MODEL_ARROWSL,
MODEL_ARROWSR,
@ -77,9 +77,9 @@ typedef struct
menutext_s exitm;
*/
//Elder: RQ3 stuff
//Elder: RQ3 stuff
menubitmap_s rq3_setuptitle;
menubitmap_s rq3_setupicon;
menubitmap_s rq3_setupicon;
// menubitmap_s ports;
// menutext_s banner;
@ -116,7 +116,7 @@ static void PlayerModel_MenuDraw( void ) {
UI_FillRect( 0, 426, SCREEN_WIDTH, 54, color_black);
UI_FillRect( 0, 54, SCREEN_WIDTH, 2, color_red);
UI_FillRect( 0, 426, SCREEN_WIDTH, 2, color_red);
// standard menu drawing
Menu_Draw( &s_playermodel.menu );
}
@ -136,7 +136,7 @@ static void PlayerModel_UpdateGrid( void )
for (i=0; i<PLAYERGRID_ROWS*PLAYERGRID_COLS; i++,j++)
{
if (j < s_playermodel.nummodels)
{
{
// model/skin portrait
s_playermodel.pics[i].generic.name = s_playermodel.modelnames[j];
s_playermodel.picbuttons[i].generic.flags &= ~QMF_INACTIVE;
@ -193,7 +193,7 @@ static void PlayerModel_UpdateModel( void )
vec3_t moveangles;
memset( &s_playermodel.playerinfo, 0, sizeof(playerInfo_t) );
viewangles[YAW] = 180 - 60;
viewangles[PITCH] = 0;
viewangles[ROLL] = 0;
@ -273,7 +273,7 @@ static sfxHandle_t PlayerModel_MenuKey( int key )
{
Menu_SetCursor(&s_playermodel.menu,s_playermodel.menu.cursor-1);
return (menu_move_sound);
}
else if (s_playermodel.modelpage > 0)
{
@ -297,7 +297,7 @@ static sfxHandle_t PlayerModel_MenuKey( int key )
{
Menu_SetCursor(&s_playermodel.menu,s_playermodel.menu.cursor+1);
return (menu_move_sound);
}
}
else if ((picnum == 15) && (s_playermodel.modelpage < s_playermodel.numpages-1))
{
s_playermodel.modelpage++;
@ -309,7 +309,7 @@ static sfxHandle_t PlayerModel_MenuKey( int key )
return (menu_buzz_sound);
}
break;
case K_MOUSE2:
case K_ESCAPE:
PlayerModel_SaveChanges();
@ -429,12 +429,15 @@ static void PlayerModel_BuildList( void )
for (i=0; i<numdirs && s_playermodel.nummodels < MAX_PLAYERMODELS; i++,dirptr+=dirlen+1)
{
dirlen = strlen(dirptr);
if (dirlen && dirptr[dirlen-1]=='/') dirptr[dirlen-1]='\0';
if (!strcmp(dirptr,".") || !strcmp(dirptr,".."))
continue;
// NiceAss: hardcoded hack to prevent other models.
if (strcmp(dirptr,"grunt")) continue;
// iterate all skin files in directory
numfiles = trap_FS_GetFileList( va("models/players/%s",dirptr), "tga", filelist, 2048 );
fileptr = filelist;
@ -458,7 +461,7 @@ static void PlayerModel_BuildList( void )
trap_S_RegisterSound( va( "sound/player/announce/%s_wins.wav", skinname), qfalse );
}
}
}
}
//APSFIXME - Degenerate no models case
@ -486,7 +489,7 @@ static void PlayerModel_SetMenuItems( void )
// model
trap_Cvar_VariableStringBuffer( "model", s_playermodel.modelskin, 64 );
// find model in our list
for (i=0; i<s_playermodel.nummodels; i++)
{
@ -503,7 +506,7 @@ static void PlayerModel_SetMenuItems( void )
if (!Q_stricmp( s_playermodel.modelskin, modelskin ))
{
// found pic, set selection here
// found pic, set selection here
s_playermodel.selectedmodel = i;
s_playermodel.modelpage = i/MAX_MODELSPERPAGE;