mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-25 21:31:37 +00:00
Menus broken again. On behalf of bigfoot.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3270 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
12a72a64f3
commit
e7b05772b6
3 changed files with 40 additions and 12 deletions
|
@ -314,7 +314,20 @@ void M_Menu_Particles_f (void)
|
|||
int y = 32;
|
||||
menu_t *menu;
|
||||
int mgt;
|
||||
extern cvar_t r_bouncysparks, r_part_rain, gl_part_flame;
|
||||
extern cvar_t r_bouncysparks, r_part_rain, gl_part_flame, r_particlesystem;
|
||||
|
||||
char *psystemopts[] =
|
||||
{
|
||||
"fixed/classic(faster)",
|
||||
"scripted",
|
||||
NULL
|
||||
};
|
||||
char *psystemvals[] =
|
||||
{
|
||||
"classic",
|
||||
"script",
|
||||
NULL
|
||||
};
|
||||
|
||||
key_dest = key_menu;
|
||||
m_state = m_complex;
|
||||
|
@ -339,6 +352,8 @@ void M_Menu_Particles_f (void)
|
|||
|
||||
menu->selecteditem = (union menuoption_s *)
|
||||
|
||||
MC_AddCvarCombo(menu, 16, y, " particle system", &r_particlesystem, psystemopts, psystemvals);y+=8;
|
||||
//fixme: hide the rest of the options if r_particlesystem==classic
|
||||
MC_AddConsoleCommand(menu, 16, y, " Choose particle set", "menu_particlesets");y+=8;
|
||||
MC_AddCheckBox(menu, 16, y, " sparks bounce", &r_bouncysparks,0);y+=8;
|
||||
// MC_AddSlider(menu, 16, y, " exp spark count", &r_particles_in_explosion, 16, 1024);y+=8;
|
||||
|
@ -364,20 +379,24 @@ typedef struct {
|
|||
} presetinfo_t;
|
||||
presetinfo_t preset[] =
|
||||
{
|
||||
//default is a reasonable nice look for single player
|
||||
//fast is for competetive deathmatch games (equivelent to the default settings of other quakrworld engines)
|
||||
//286 is an attempt to get the very vest fps possible, if you're crazy
|
||||
{"r_presetname", {"286", "fast", "default", "nice", "realtime"}},
|
||||
{"gl_texturemode", {"nn", "ln", "ln", "ll", "ll"}},
|
||||
{"r_particlesdesc", {"none", "highfps", "spikeset tsshaft", "spikeset tsshaft", "spikeset tsshaft"}},
|
||||
{"r_particlesystem", {"none", "classic", "script", "script", "script"}},
|
||||
{"r_stains", {"0", "0", "0.75", "0.75", "0.75"}},
|
||||
{"r_drawflat", {"1", "0", "0", "0", "0"}},
|
||||
{"r_nolerp", {"1", "1", "0", "0", "0"}},
|
||||
{"r_nolightdir", {"1", "0", "0", "0", "0"}},
|
||||
{"r_nolerp", {"1", "0", "0", "0", "0"}},
|
||||
{"r_nolightdir", {"1", "1", "0", "0", "0"}},
|
||||
{"r_dynamic", {"0", "0", "1", "1", "1"}},
|
||||
{"r_bloom", {"0", "0", "0", "0", "1"}},
|
||||
{"gl_flashblend", {"0", "1", "0", "1", "2"}},
|
||||
{"gl_bump", {"0", "0", "0", "1", "1"}},
|
||||
{"gl_specular", {"0", "0", "0", "1", "1"}},
|
||||
{"r_loadlit", {"0", "1", "1", "2", "2"}},
|
||||
{"r_fastsky", {"1", "1", "0", "0", "0"}},
|
||||
{"r_fastsky", {"1", "0", "0", "0", "0"}},
|
||||
{"r_waterlayers", {"0", "2", "3", "4", "4"}},
|
||||
{"r_shadows", {"0", "0", "0", "1", "1"}},
|
||||
{"r_shadow_realtime_world",{"0", "0", "0", "0", "1"}},
|
||||
|
|
|
@ -86,7 +86,7 @@ void M_Menu_Save_f (void)
|
|||
|
||||
for (i=0 ; i< MAX_SAVEGAMES; i++)
|
||||
{
|
||||
op = (menuoption_t *)MC_AddConsoleCommandf(menu, 16, 32+8*i, m_filenames[i], "savegame s%i\ntogglemenu\n", i);
|
||||
op = (menuoption_t *)MC_AddConsoleCommandf(menu, 16, 32+8*i, m_filenames[i], "savegame s%i\nclosemenu\n", i);
|
||||
if (!menu->selecteditem)
|
||||
menu->selecteditem = op;
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ void M_Menu_Load_f (void)
|
|||
for (i=0 ; i< MAX_SAVEGAMES; i++)
|
||||
{
|
||||
if (loadable[i])
|
||||
op = (menuoption_t *)MC_AddConsoleCommandf(menu, 16, 32+8*i, m_filenames[i], "loadgame s%i\ntogglemenu\n", i);
|
||||
op = (menuoption_t *)MC_AddConsoleCommandf(menu, 16, 32+8*i, m_filenames[i], "loadgame s%i\nclosemenu\n", i);
|
||||
else
|
||||
MC_AddWhiteText(menu, 16, 32+8*i, m_filenames[i], false);
|
||||
if (!menu->selecteditem && op)
|
||||
|
@ -178,9 +178,9 @@ void M_Menu_SinglePlayer_f (void)
|
|||
MC_AddCenterPicture(menu, 0, "gfx/menu/title1.lmp");
|
||||
|
||||
menu->selecteditem = (menuoption_t*)
|
||||
MC_AddConsoleCommand (menu, 64, 64, "Easy", "togglemenu\nskill 0;deathmatch 0; coop 0;map demo1\n");
|
||||
MC_AddConsoleCommand (menu, 64, 72, "Medium", "togglemenu\nskill 1;deathmatch 0; coop 0;map demo1\n");
|
||||
MC_AddConsoleCommand (menu, 64, 80, "Hard", "togglemenu\nskill 2;deathmatch 0; coop 0;map demo1\n");
|
||||
MC_AddConsoleCommand (menu, 64, 64, "Easy", "closemenu\nskill 0;deathmatch 0; coop 0;map demo1\n");
|
||||
MC_AddConsoleCommand (menu, 64, 72, "Medium", "closemenu\nskill 1;deathmatch 0; coop 0;map demo1\n");
|
||||
MC_AddConsoleCommand (menu, 64, 80, "Hard", "closemenu\nskill 2;deathmatch 0; coop 0;map demo1\n");
|
||||
|
||||
MC_AddConsoleCommand (menu, 64, 96, "Load Game", "menu_load\n");
|
||||
MC_AddConsoleCommand (menu, 64, 104, "Save Game", "menu_save\n");
|
||||
|
@ -198,7 +198,7 @@ void M_Menu_SinglePlayer_f (void)
|
|||
MC_AddCenterPicture(menu, 0, "gfx/p_option.lmp");
|
||||
|
||||
menu->selecteditem = (menuoption_t*)
|
||||
MC_AddConsoleCommandQBigFont (menu, 72, 32, "New Game", "togglemenu\nmaxclients 1;deathmatch 0;coop 0;map start\n");
|
||||
MC_AddConsoleCommandQBigFont (menu, 72, 32, "New Game", "closemenu\nmaxclients 1;deathmatch 0;coop 0;map start\n");
|
||||
MC_AddConsoleCommandQBigFont (menu, 72, 52, "Load Game", "menu_load\n");
|
||||
MC_AddConsoleCommandQBigFont (menu, 72, 72, "Save Game", "menu_save\n");
|
||||
|
||||
|
@ -230,7 +230,7 @@ void M_Menu_SinglePlayer_f (void)
|
|||
#else
|
||||
MC_AddPicture(menu, 72, 32, "gfx/sp_menu.lmp");
|
||||
|
||||
b = MC_AddConsoleCommand (menu, 16, 32, "", "togglemenu\nmaxclients 1;deathmatch 0;coop 0;map start\n");
|
||||
b = MC_AddConsoleCommand (menu, 16, 32, "", "closemenu\nmaxclients 1;deathmatch 0;coop 0;map start\n");
|
||||
menu->selecteditem = (menuoption_t *)b;
|
||||
b->common.width = p->width;
|
||||
b->common.height = 20;
|
||||
|
@ -613,7 +613,7 @@ void M_Menu_ParticleSets_f (void)
|
|||
menu->remove = M_Demo_Remove;
|
||||
info = menu->data;
|
||||
|
||||
info->command[0] = "r_particlesdesc";
|
||||
info->command[0] = "r_particlesystem script; r_particlesdesc";
|
||||
info->ext[0] = ".cfg";
|
||||
info->numext = 1;
|
||||
|
||||
|
|
|
@ -210,6 +210,14 @@ void M_DrawTextBox (int x, int y, int width, int lines)
|
|||
|
||||
int m_save_demonum;
|
||||
|
||||
void M_CloseMenu_f (void)
|
||||
{
|
||||
if (key_dest != key_menu)
|
||||
return;
|
||||
M_RemoveAllMenus();
|
||||
key_dest = key_game;
|
||||
m_state = m_none;
|
||||
}
|
||||
/*
|
||||
================
|
||||
M_ToggleMenu_f
|
||||
|
@ -989,6 +997,7 @@ void M_Init (void)
|
|||
M_Init_Internal();
|
||||
|
||||
Cmd_AddCommand("togglemenu", M_ToggleMenu_f);
|
||||
Cmd_AddCommand("closemenu", M_CloseMenu_f);
|
||||
Cmd_AddCommand("fps_preset", FPS_Preset_f);
|
||||
|
||||
Cvar_Register(&m_helpismedia, "Menu thingumiebobs");
|
||||
|
|
Loading…
Reference in a new issue