Ejemplo n.º 1
0
static int context_hud_handler(window_info *win, int widget_id, int mx, int my, int option)
{
	unsigned char protocol_name;
	switch (option)
	{
		case CMH_MINIMAP: view_window(&minimap_win, 0); break;
		case CMH_RANGSTATS: view_window(&range_win, 0); break;
#ifdef NEW_SOUND
		case CMH_SOUND: toggle_sounds(&sound_on); set_var_unsaved("enable_sound", INI_FILE_VAR); break;
		case CMH_MUSIC: toggle_music(&music_on); set_var_unsaved("enable_music", INI_FILE_VAR); break;
#endif // NEW_SOUND
		case CMH_LOCATION:
			copy_next_LOCATE_ME = 1;
			protocol_name= LOCATE_ME;
			my_tcp_send(my_socket,&protocol_name,1);
			break;
		default:
			init_misc_display();
	}
	return 1;
}
Ejemplo n.º 2
0
void toggle_full_screen()
{
#ifdef WINDOWS
	full_screen=!full_screen;
	set_var_unsaved("full_screen", INI_FILE_VAR);
	LOG_TO_CONSOLE(c_green2, video_restart_str);
#else
	reload_tab_map = 1;
	full_screen=!full_screen;
	switch_video(video_mode, full_screen);
	build_video_mode_array();
	if (!disable_gamma_adjust)
		SDL_SetGamma(gamma_var, gamma_var, gamma_var);
	SDL_SetModState(KMOD_NONE); // force ALL keys up
#endif
}