Ejemplo n.º 1
0
void main()
{	
	//reset_globals();

	setGameInputToEnabled(true, true);
	setAirbrakeRelatedInputToBlocked(false, true);

	write_text_to_log_file("Setting up calls");

	set_periodic_feature_call(update_features);

	write_text_to_log_file("Loading settings");

	load_settings();

	init_vehicle_feature();

	write_text_to_log_file("Loaded settings OK");

	// this creates a new locale based on the current application default
	// (which is either the one given on startup, but can be overriden with
	// std::locale::global) - then extends it with an extra facet that 
	// controls numeric output.
	std::locale comma_locale(std::locale(), new comma_numpunct());

	// tell cout to use our new locale.
	std::cout.imbue(comma_locale);
	
	set_status_text("~HUD_COLOUR_MENU_YELLOW~ENT ~HUD_COLOUR_WHITE~is ready!");

	while (true)
	{
		if (trainer_switch_pressed())
		{
			menu_beep();
			set_menu_showing(true);
			process_main_menu();
			set_menu_showing(false);
		}
		else if (airbrake_switch_pressed())
		{
			menu_beep();
			process_airbrake_menu();
		}

		update_features();

		WAIT(0);
	}
}
void main()
{	
	set_periodic_feature_call(updateStuff);

	featurePlayerBlips = config->get_trainer_config()->setting_player_blips;
	featurePlayerHeadDisplay = config->get_trainer_config()->setting_player_head_display;
	featurePlayerBlipCone = config->get_trainer_config()->setting_player_blip_cone;
	featurePlayerNotifications = config->get_trainer_config()->setting_player_notifications;
	featureShowVoiceChatSpeaker = config->get_trainer_config()->setting_show_voice_chat_speaker;

	while (true)
	{
		if (is_menu_showing())
		{
			menu_beep(0);
			process_main_menu();
			set_menu_showing(false);
		}

		updateStuff();
		WAIT(0);
	}

}
Ejemplo n.º 3
0
void draw_menu_screen(char menutype[])
{
//	draw_screen_outline();
	
	
	/* Draw the Main Menu */
	if(strcmp(menutype, "main") == 0)
	{
		
		int MMITEMS=0, MMKey;
		
		while(MMITEMS != 8) {
			process_main_menu(MMITEMS);
			refresh();
			
			do 
			{
				MMKey = getch();
				switch(MMKey)
				{
					case KEY_UP:
					 MMITEMS--;
					 if(MMITEMS < 0) MMITEMS = MMAX-1;
					break;
					case KEY_DOWN:
					 MMITEMS++;
					 if(MMITEMS > MMAX) MMITEMS = 0;
					break;
					
				}
				process_main_menu(MMITEMS);
				refresh();
				} while(MMKey != '\n');
				
				/* Main Menu Responses */
				
				if(MMITEMS == 0)
				{
					draw_menu_screen("sysinfo");
					
				}
				
				if (MMITEMS == 1)
				{
				     user_manager_main();
				}
				
				if (MMITEMS == 2)
				{
				     filesystem_manager_main();
				}
				
				if (MMITEMS == 3)
				{
				     group_manager_main();
				}
				
				if(MMITEMS == 5)
				{
					draw_menu_screen("syscfg");
					
				}
				
	
		}
	}  // End of Strcmp 
	
	/* System Info Menu */
	
	if(strcmp(menutype, "sysinfo") == 0) 
	{
		int SIItems, SIKey;
		SIItems = 0;
		
		while(SIItems != 5) {
			process_sysinfo_menu(SIItems);
			refresh();
			
			do 
			{
				SIKey = getch();
				switch(SIKey)
				{
					case KEY_UP:
					 SIItems--;
					 if(SIItems < 0) SIItems = SIMAX-1;
					break;
					case KEY_DOWN:
					 SIItems++;
					 if(SIItems > SIMAX) SIItems = 0;
					break;
					
				}
				process_sysinfo_menu(SIItems);
				refresh();
				} while(SIKey != '\n');
		
		
		process_sysinfo_menu(SIItems);
		//draw_screen_outline();
	}	
		
  } // End of Strcmp
  
  
  /* System Config Menu */
	
	if(strcmp(menutype, "syscfg") == 0) 
	{
		int SCItems, SCKey;
		SCItems = 0;
		
		while(SCItems != 7) {
			process_sysconf_menu(SCItems);
			refresh();
			
			do 
			{
				SCKey = getch();
				switch(SCKey)
				{
					case KEY_UP:
					 SCItems--;
					 if(SCItems < 0) SCItems = SCMAX-1;
					break;
					case KEY_DOWN:
					 SCItems++;
					 if(SCItems > SCMAX) SCItems = 0;
					break;
					
				}
				process_sysconf_menu(SCItems);
				refresh();
				} while(SCKey != '\n');
		
		
		process_sysconf_menu(SCItems);
//		draw_screen_outline();
	}	
		
  } // End of Strcmp
	
	
	
	
}  // End of Function