mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-27 22:43:48 +00:00
Release 25 UI
This commit is contained in:
parent
7ad6e28bb3
commit
f3fbe78e9c
2 changed files with 20 additions and 17 deletions
|
@ -87,11 +87,11 @@ void UI_CheckKickCvar( void ) {
|
||||||
trap_Cvar_VariableStringBuffer("RQ3_CvarKickReason", Cvar, sizeof(Cvar));
|
trap_Cvar_VariableStringBuffer("RQ3_CvarKickReason", Cvar, sizeof(Cvar));
|
||||||
|
|
||||||
if (strlen(Cvar)) {
|
if (strlen(Cvar)) {
|
||||||
Com_Printf("AHAH!: [%s]\n", Cvar);
|
|
||||||
trap_Cvar_Set("RQ3_CvarKickReason", "");
|
trap_Cvar_Set("RQ3_CvarKickReason", "");
|
||||||
strcat(Reason, Cvar);
|
strcat(Reason, Cvar);
|
||||||
strcat(Reason, " is out of range.");
|
strcat(Reason, " is out of range.");
|
||||||
s_main.rq3_kicktext.string = Reason;
|
s_main.rq3_kicktext.string = Reason;
|
||||||
|
Com_Printf("%s\n", Reason);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
s_main.rq3_kicktext.string = "";
|
s_main.rq3_kicktext.string = "";
|
||||||
|
|
|
@ -22,13 +22,13 @@
|
||||||
|
|
||||||
static char* playermodel_artlist[] =
|
static char* playermodel_artlist[] =
|
||||||
{
|
{
|
||||||
MODEL_BACK0,
|
MODEL_BACK0,
|
||||||
MODEL_BACK1,
|
MODEL_BACK1,
|
||||||
MODEL_SELECT,
|
MODEL_SELECT,
|
||||||
MODEL_SELECTED,
|
MODEL_SELECTED,
|
||||||
//MODEL_FRAMEL,
|
//MODEL_FRAMEL,
|
||||||
//MODEL_FRAMER,
|
//MODEL_FRAMER,
|
||||||
//MODEL_PORTS,
|
//MODEL_PORTS,
|
||||||
MODEL_ARROWS,
|
MODEL_ARROWS,
|
||||||
MODEL_ARROWSL,
|
MODEL_ARROWSL,
|
||||||
MODEL_ARROWSR,
|
MODEL_ARROWSR,
|
||||||
|
@ -77,9 +77,9 @@ typedef struct
|
||||||
menutext_s exitm;
|
menutext_s exitm;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//Elder: RQ3 stuff
|
//Elder: RQ3 stuff
|
||||||
menubitmap_s rq3_setuptitle;
|
menubitmap_s rq3_setuptitle;
|
||||||
menubitmap_s rq3_setupicon;
|
menubitmap_s rq3_setupicon;
|
||||||
|
|
||||||
// menubitmap_s ports;
|
// menubitmap_s ports;
|
||||||
// menutext_s banner;
|
// menutext_s banner;
|
||||||
|
@ -116,7 +116,7 @@ static void PlayerModel_MenuDraw( void ) {
|
||||||
UI_FillRect( 0, 426, SCREEN_WIDTH, 54, color_black);
|
UI_FillRect( 0, 426, SCREEN_WIDTH, 54, color_black);
|
||||||
UI_FillRect( 0, 54, SCREEN_WIDTH, 2, color_red);
|
UI_FillRect( 0, 54, SCREEN_WIDTH, 2, color_red);
|
||||||
UI_FillRect( 0, 426, SCREEN_WIDTH, 2, color_red);
|
UI_FillRect( 0, 426, SCREEN_WIDTH, 2, color_red);
|
||||||
|
|
||||||
// standard menu drawing
|
// standard menu drawing
|
||||||
Menu_Draw( &s_playermodel.menu );
|
Menu_Draw( &s_playermodel.menu );
|
||||||
}
|
}
|
||||||
|
@ -136,7 +136,7 @@ static void PlayerModel_UpdateGrid( void )
|
||||||
for (i=0; i<PLAYERGRID_ROWS*PLAYERGRID_COLS; i++,j++)
|
for (i=0; i<PLAYERGRID_ROWS*PLAYERGRID_COLS; i++,j++)
|
||||||
{
|
{
|
||||||
if (j < s_playermodel.nummodels)
|
if (j < s_playermodel.nummodels)
|
||||||
{
|
{
|
||||||
// model/skin portrait
|
// model/skin portrait
|
||||||
s_playermodel.pics[i].generic.name = s_playermodel.modelnames[j];
|
s_playermodel.pics[i].generic.name = s_playermodel.modelnames[j];
|
||||||
s_playermodel.picbuttons[i].generic.flags &= ~QMF_INACTIVE;
|
s_playermodel.picbuttons[i].generic.flags &= ~QMF_INACTIVE;
|
||||||
|
@ -193,7 +193,7 @@ static void PlayerModel_UpdateModel( void )
|
||||||
vec3_t moveangles;
|
vec3_t moveangles;
|
||||||
|
|
||||||
memset( &s_playermodel.playerinfo, 0, sizeof(playerInfo_t) );
|
memset( &s_playermodel.playerinfo, 0, sizeof(playerInfo_t) );
|
||||||
|
|
||||||
viewangles[YAW] = 180 - 60;
|
viewangles[YAW] = 180 - 60;
|
||||||
viewangles[PITCH] = 0;
|
viewangles[PITCH] = 0;
|
||||||
viewangles[ROLL] = 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);
|
Menu_SetCursor(&s_playermodel.menu,s_playermodel.menu.cursor-1);
|
||||||
return (menu_move_sound);
|
return (menu_move_sound);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (s_playermodel.modelpage > 0)
|
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);
|
Menu_SetCursor(&s_playermodel.menu,s_playermodel.menu.cursor+1);
|
||||||
return (menu_move_sound);
|
return (menu_move_sound);
|
||||||
}
|
}
|
||||||
else if ((picnum == 15) && (s_playermodel.modelpage < s_playermodel.numpages-1))
|
else if ((picnum == 15) && (s_playermodel.modelpage < s_playermodel.numpages-1))
|
||||||
{
|
{
|
||||||
s_playermodel.modelpage++;
|
s_playermodel.modelpage++;
|
||||||
|
@ -309,7 +309,7 @@ static sfxHandle_t PlayerModel_MenuKey( int key )
|
||||||
return (menu_buzz_sound);
|
return (menu_buzz_sound);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case K_MOUSE2:
|
case K_MOUSE2:
|
||||||
case K_ESCAPE:
|
case K_ESCAPE:
|
||||||
PlayerModel_SaveChanges();
|
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)
|
for (i=0; i<numdirs && s_playermodel.nummodels < MAX_PLAYERMODELS; i++,dirptr+=dirlen+1)
|
||||||
{
|
{
|
||||||
dirlen = strlen(dirptr);
|
dirlen = strlen(dirptr);
|
||||||
|
|
||||||
if (dirlen && dirptr[dirlen-1]=='/') dirptr[dirlen-1]='\0';
|
if (dirlen && dirptr[dirlen-1]=='/') dirptr[dirlen-1]='\0';
|
||||||
|
|
||||||
if (!strcmp(dirptr,".") || !strcmp(dirptr,".."))
|
if (!strcmp(dirptr,".") || !strcmp(dirptr,".."))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// NiceAss: hardcoded hack to prevent other models.
|
||||||
|
if (strcmp(dirptr,"grunt")) continue;
|
||||||
|
|
||||||
// iterate all skin files in directory
|
// iterate all skin files in directory
|
||||||
numfiles = trap_FS_GetFileList( va("models/players/%s",dirptr), "tga", filelist, 2048 );
|
numfiles = trap_FS_GetFileList( va("models/players/%s",dirptr), "tga", filelist, 2048 );
|
||||||
fileptr = filelist;
|
fileptr = filelist;
|
||||||
|
@ -458,7 +461,7 @@ static void PlayerModel_BuildList( void )
|
||||||
trap_S_RegisterSound( va( "sound/player/announce/%s_wins.wav", skinname), qfalse );
|
trap_S_RegisterSound( va( "sound/player/announce/%s_wins.wav", skinname), qfalse );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//APSFIXME - Degenerate no models case
|
//APSFIXME - Degenerate no models case
|
||||||
|
|
||||||
|
@ -486,7 +489,7 @@ static void PlayerModel_SetMenuItems( void )
|
||||||
|
|
||||||
// model
|
// model
|
||||||
trap_Cvar_VariableStringBuffer( "model", s_playermodel.modelskin, 64 );
|
trap_Cvar_VariableStringBuffer( "model", s_playermodel.modelskin, 64 );
|
||||||
|
|
||||||
// find model in our list
|
// find model in our list
|
||||||
for (i=0; i<s_playermodel.nummodels; i++)
|
for (i=0; i<s_playermodel.nummodels; i++)
|
||||||
{
|
{
|
||||||
|
@ -503,7 +506,7 @@ static void PlayerModel_SetMenuItems( void )
|
||||||
|
|
||||||
if (!Q_stricmp( s_playermodel.modelskin, modelskin ))
|
if (!Q_stricmp( s_playermodel.modelskin, modelskin ))
|
||||||
{
|
{
|
||||||
// found pic, set selection here
|
// found pic, set selection here
|
||||||
s_playermodel.selectedmodel = i;
|
s_playermodel.selectedmodel = i;
|
||||||
s_playermodel.modelpage = i/MAX_MODELSPERPAGE;
|
s_playermodel.modelpage = i/MAX_MODELSPERPAGE;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue