Ejemplo n.º 1
0
void Menu_MultiPlayer_Init()
{
	Settings_Page_Init(sbsettings, sbsettings_arr);
	Settings_Page_Init(create_game_options, create_game_options_arr);

	CTab_Init(&sb_tab);
	CTab_AddPage(&sb_tab, "Servers", SBPG_SERVERS, &sb_servers_handlers);
	CTab_AddPage(&sb_tab, "Sources", SBPG_SOURCES, &sb_sources_handlers);
	CTab_AddPage(&sb_tab, "Players", SBPG_PLAYERS, &sb_players_handlers);
	CTab_AddPage(&sb_tab, "Options", SBPG_OPTIONS, &sb_options_handlers);
	CTab_AddPage(&sb_tab, "Create", SBPG_CREATEGAME, &sb_creategame_handlers);
	CTab_SetCurrentId(&sb_tab, SBPG_SERVERS);
}
Ejemplo n.º 2
0
void Menu_Options_Init(void) {
	Settings_MainInit();

	Settings_Page_Init(settmisc, settmisc_arr);
	Settings_Page_Init(settfps, settfps_arr);
	Settings_Page_Init(settview, settview_arr);
	Settings_Page_Init(settplayer, settplayer_arr);
	Settings_Page_Init(settbinds, settbinds_arr);
	Settings_Page_Init(settsystem, settsystem_arr);
	Settings_Page_Init(settconfig, settconfig_arr);

	Cvar_SetCurrentGroup(CVAR_GROUP_MENU);
	Cvar_Register(&menu_advanced);
	Cvar_ResetCurrentGroup();

	FL_Init(&configs_filelist, "./ezquake/configs");
	FL_SetDirUpOption(&configs_filelist, false);
	FL_SetDirsOption(&configs_filelist, false);
	FL_AddFileType(&configs_filelist, 0, ".cfg");
	FL_AddFileType(&configs_filelist, 1, ".txt");

	CEditBox_Init(&filenameeb, 32, 64);

	CTab_Init(&options_tab);
	CTab_AddPage(&options_tab, "Player", OPTPG_PLAYER, &options_player_handlers);
	CTab_AddPage(&options_tab, "Graphics", OPTPG_FPS, &options_graphics_handlers);
	CTab_AddPage(&options_tab, "View", OPTPG_HUD, &options_view_handlers);
	CTab_AddPage(&options_tab, "Controls", OPTPG_BINDS, &options_controls_handlers);
	CTab_AddPage(&options_tab, "Misc", OPTPG_MISC, &options_misc_handlers);
	CTab_AddPage(&options_tab, "System", OPTPG_SYSTEM, &options_system_handlers);
	CTab_AddPage(&options_tab, "Config", OPTPG_CONFIG, &options_config_handlers);
	CTab_SetCurrentId(&options_tab, OPTPG_PLAYER);
}
Ejemplo n.º 3
0
void Menu_Demo_Init(void)
{
	Cvar_SetCurrentGroup(CVAR_GROUP_SCREEN);
	Cvar_Register (&demo_playlist_loop);
	Cvar_Register (&demo_playlist_track_name);
	Cvar_ResetCurrentGroup();

	Cmd_AddCommand ("demo_playlist_stop", M_Demo_Playlist_Stop_f);
	Cmd_AddCommand ("demo_playlist_next", M_Demo_Playlist_Next_f);
	Cmd_AddCommand ("demo_playlist_prev", M_Demo_Playlist_Prev_f);
	Cmd_AddCommand ("demo_playlist_clear", M_Demo_Playlist_Clear_f);

	FL_Init(&demo_filelist, "./qw");
    FL_AddFileType(&demo_filelist, 0, ".qwd");
	FL_AddFileType(&demo_filelist, 1, ".qwz");
	FL_AddFileType(&demo_filelist, 2, ".mvd");
	FL_AddFileType(&demo_filelist, 3, ".dem");
	#ifdef WITH_VFS_ARCHIVE_LOADING
	FL_AddFileType(&demo_filelist, 4, ".tar");
	FL_AddFileType(&demo_filelist, 4, ".pak");
	#endif // WITH_VFS_ARCHIVE_LOADING
	#ifdef WITH_ZLIB
	FL_AddFileType(&demo_filelist, 4, ".gz");
	#endif // WITH_ZLIB
	#ifdef WITH_ZIP
	FL_AddFileType(&demo_filelist, 4, ".zip");
	FL_AddFileType(&demo_filelist, 4, ".pk3");
	#endif // WITH_ZIP

	Settings_Page_Init(demoplsett, demoplsett_arr);

	// initialize tab control
    CTab_Init(&demo_tab);
	CTab_AddPage(&demo_tab, "Browser", DEMOPG_BROWSER, &demo_browser_handlers);
	CTab_AddPage(&demo_tab, "Playlist", DEMOPG_PLAYLIST, &demo_playlist_handlers);
	CTab_AddPage(&demo_tab, "Entry", DEMOPG_ENTRY, &demo_entry_handlers);
	CTab_AddPage(&demo_tab, "Options", DEMOPG_OPTIONS, &demo_options_handlers);
	CTab_SetCurrentId(&demo_tab, DEMOPG_BROWSER);
}
Ejemplo n.º 4
0
void Menu_Options_Init(void) {
	Settings_MainInit();

	Settings_Page_Init(settmisc, settmisc_arr);
	Settings_Page_Init(settfps, settfps_arr);
	Settings_Page_Init(settview, settview_arr);
	Settings_Page_Init(settplayer, settplayer_arr);
	Settings_Page_Init(settbinds, settbinds_arr);
	Settings_Page_Init(settsystem, settsystem_arr);
	Settings_Page_Init(settconfig, settconfig_arr);

	Cvar_SetCurrentGroup(CVAR_GROUP_MENU);
	Cvar_Register(&menu_advanced);
	Cvar_ResetCurrentGroup();

	// this is here just to not get a crash in Cvar_Set
	mss_selected.freq.name = "menu_tempval_video_freq";
	mss_previous.freq.name = mss_selected.freq.name;
	mss_selected.freq.string = NULL;
	mss_previous.freq.string = NULL;
	mss_selected.freq.next = &mss_selected.freq;
	mss_previous.freq.next = &mss_previous.freq;

	FL_Init(&configs_filelist, "./ezquake/configs");
	FL_SetDirUpOption(&configs_filelist, false);
	FL_SetDirsOption(&configs_filelist, false);
	FL_AddFileType(&configs_filelist, 0, ".cfg");
	FL_AddFileType(&configs_filelist, 1, ".txt");

	CEditBox_Init(&filenameeb, 32, 64);

	CTab_Init(&options_tab);
	CTab_AddPage(&options_tab, "Player", OPTPG_PLAYER, &options_player_handlers);
	CTab_AddPage(&options_tab, "Graphics", OPTPG_FPS, &options_graphics_handlers);
	CTab_AddPage(&options_tab, "View", OPTPG_HUD, &options_view_handlers);
	CTab_AddPage(&options_tab, "Controls", OPTPG_BINDS, &options_controls_handlers);
	CTab_AddPage(&options_tab, "Misc", OPTPG_MISC, &options_misc_handlers);
	CTab_AddPage(&options_tab, "System", OPTPG_SYSTEM, &options_system_handlers);
	CTab_AddPage(&options_tab, "Config", OPTPG_CONFIG, &options_config_handlers);
	CTab_SetCurrentId(&options_tab, OPTPG_PLAYER);
}
Ejemplo n.º 5
0
void Menu_Options_Init(void) {
	Settings_MainInit();

	Settings_Page_Init(settgeneral, settgeneral_arr);
	Settings_Page_Init(settfps, settfps_arr);
	Settings_Page_Init(settdemo_spec, settdemo_spec_arr);
	Settings_Page_Init(setthud, setthud_arr);
	Settings_Page_Init(settplayer, settplayer_arr);
	Settings_Page_Init(settbinds, settbinds_arr);
#ifdef GLQUAKE
	Settings_Page_Init(settvideo, settvideo_arr);
#endif
	Settings_Page_Init(settconfig, settconfig_arr);

	Cvar_Register(&menu_advanced);
#ifdef GLQUAKE
	// this is here just to not get a crash in Cvar_Set
    mvs_selected.freq.name = "menu_tempval_video_freq";
	mvs_previous.freq.name = mvs_selected.freq.name;
    mvs_selected.freq.string = NULL;
    mvs_previous.freq.string = NULL;
    mvs_selected.freq.next = &mvs_selected.freq;
    mvs_previous.freq.next = &mvs_previous.freq;
#endif

	Cvar_SetCurrentGroup(CVAR_GROUP_CONFIG);
	Cvar_Register(&cfg_browser_showsize);
    Cvar_Register(&cfg_browser_showdate);
    Cvar_Register(&cfg_browser_showtime);
    Cvar_Register(&cfg_browser_sortmode);
    Cvar_Register(&cfg_browser_showstatus);
    Cvar_Register(&cfg_browser_stripnames);
    Cvar_Register(&cfg_browser_interline);
	Cvar_Register(&cfg_browser_scrollnames);
	Cvar_Register(&cfg_browser_selectedcolor);
	Cvar_Register(&cfg_browser_democolor);
	Cvar_Register(&cfg_browser_dircolor);
#ifdef WITH_ZIP
	Cvar_Register(&cfg_browser_zipcolor);
#endif
	Cvar_ResetCurrentGroup();


	FL_Init(&configs_filelist,
        &cfg_browser_sortmode,
        &cfg_browser_showsize,
        &cfg_browser_showdate,
        &cfg_browser_showtime,
        &cfg_browser_stripnames,
        &cfg_browser_interline,
        &cfg_browser_showstatus,
		&cfg_browser_scrollnames,
		&cfg_browser_democolor,
		&cfg_browser_selectedcolor,
		&cfg_browser_dircolor,
#ifdef WITH_ZIP
		&cfg_browser_zipcolor,
#endif
		"./ezquake/configs");
	FL_SetDirUpOption(&configs_filelist, false);
	FL_SetDirsOption(&configs_filelist, false);
	FL_AddFileType(&configs_filelist, 0, ".cfg");
	FL_AddFileType(&configs_filelist, 1, ".txt");

	CEditBox_Init(&filenameeb, 32, 64);

	CTab_Init(&options_tab);
	CTab_AddPage(&options_tab, "main", OPTPG_SETTINGS, &options_main_handlers);
	CTab_AddPage(&options_tab, "player", OPTPG_PLAYER, &options_player_handlers);
	CTab_AddPage(&options_tab, "graphics", OPTPG_FPS, &options_graphics_handlers);
	CTab_AddPage(&options_tab, "hud", OPTPG_HUD, &options_hud_handlers);
	CTab_AddPage(&options_tab, "demo/spec", OPTPG_DEMO_SPEC, &options_demo_spec_handlers);
	CTab_AddPage(&options_tab, "controls", OPTPG_BINDS, &options_controls_handlers);
	CTab_AddPage(&options_tab, "video", OPTPG_VIDEO, &options_video_handlers);
	CTab_AddPage(&options_tab, "config", OPTPG_CONFIG, &options_config_handlers);
	CTab_SetCurrentId(&options_tab, OPTPG_SETTINGS);
}
Ejemplo n.º 6
0
void Menu_Demo_Init(void)
{
	Cvar_SetCurrentGroup(CVAR_GROUP_DEMO);
	Cvar_Register(&demo_browser_showsize);
    Cvar_Register(&demo_browser_showdate);
    Cvar_Register(&demo_browser_showtime);
    Cvar_Register(&demo_browser_sortmode);
    Cvar_Register(&demo_browser_showstatus);
    Cvar_Register(&demo_browser_stripnames);
    Cvar_Register(&demo_browser_interline);
	Cvar_Register(&demo_browser_scrollnames);
	Cvar_Register(&demo_browser_selectedcolor);
	Cvar_Register(&demo_browser_democolor);
	Cvar_Register(&demo_browser_dircolor);
#ifdef WITH_ZIP
	Cvar_Register(&demo_browser_zipcolor);
#endif
	Cvar_ResetCurrentGroup();

	Cvar_SetCurrentGroup(CVAR_GROUP_SCREEN);
	Cvar_Register (&demo_playlist_loop);
	Cvar_Register (&demo_playlist_track_name);
	Cvar_ResetCurrentGroup();

	Cmd_AddCommand ("demo_playlist_stop", M_Demo_Playlist_Stop_f);
	Cmd_AddCommand ("demo_playlist_next", M_Demo_Playlist_Next_f);
	Cmd_AddCommand ("demo_playlist_prev", M_Demo_Playlist_Prev_f);
	Cmd_AddCommand ("demo_playlist_clear", M_Demo_Playlist_Clear_f);

	FL_Init(&demo_filelist,
        &demo_browser_sortmode,
        &demo_browser_showsize,
        &demo_browser_showdate,
        &demo_browser_showtime,
        &demo_browser_stripnames,
        &demo_browser_interline,
        &demo_browser_showstatus,
		&demo_browser_scrollnames,
		&demo_browser_democolor,
		&demo_browser_selectedcolor,
		&demo_browser_dircolor,
	#ifdef WITH_ZIP
		&demo_browser_zipcolor,
	#endif
		"./qw");
    FL_AddFileType(&demo_filelist, 0, ".qwd");
	FL_AddFileType(&demo_filelist, 1, ".qwz");
	FL_AddFileType(&demo_filelist, 2, ".mvd");
	FL_AddFileType(&demo_filelist, 3, ".dem");
	#ifdef WITH_VFS_ARCHIVE_LOADING
	FL_AddFileType(&demo_filelist, 4, ".tar");
	FL_AddFileType(&demo_filelist, 4, ".pak");
	#endif // WITH_VFS_ARCHIVE_LOADING
	#ifdef WITH_ZLIB
	FL_AddFileType(&demo_filelist, 4, ".gz");
	#endif // WITH_ZLIB
	#ifdef WITH_ZIP
	FL_AddFileType(&demo_filelist, 4, ".zip");
	FL_AddFileType(&demo_filelist, 4, ".pk3");
	#endif // WITH_ZIP

	Settings_Page_Init(demoplsett, demoplsett_arr);

	// initialize tab control
    CTab_Init(&demo_tab);
	CTab_AddPage(&demo_tab, "browser", DEMOPG_BROWSER, &demo_browser_handlers);
	CTab_AddPage(&demo_tab, "playlist", DEMOPG_PLAYLIST, &demo_playlist_handlers);
	CTab_AddPage(&demo_tab, "entry", DEMOPG_ENTRY, &demo_entry_handlers);
	CTab_AddPage(&demo_tab, "options", DEMOPG_OPTIONS, &demo_options_handlers);
	CTab_SetCurrentId(&demo_tab, DEMOPG_BROWSER);
}