Ejemplo n.º 1
0
void notify_main_screen_exit_button (ui_object *obj, void *arg)
{

	if ((int) arg == BUTTON_STATE_DOWN)
	{

		set_ui_object_graphic (obj, (unsigned short int *) get_graphics_file_data (GRAPHICS_UI_APACHE_PLANNER_BACK_BUTTON_SELECTED));

		set_ui_object_redraw (main_screen, TRUE);
	}
	else if ((int) arg == BUTTON_STATE_UP)
	{

		set_ui_object_graphic (obj, (unsigned short int *) get_graphics_file_data (GRAPHICS_UI_APACHE_PLANNER_BACK_BUTTON_UNSELECTED));

		push_ui_screen ( exit_screen );
	}
	else
	{

		set_ui_object_graphic (obj, (unsigned short int *) get_graphics_file_data (GRAPHICS_UI_APACHE_PLANNER_BACK_BUTTON_UNSELECTED));

		set_ui_object_redraw (main_screen, TRUE);
	}

	set_ui_object_graphic_type (obj, UI_OBJECT_ALPHA_GRAPHIC);
}
Ejemplo n.º 2
0
void notify_main_credits_button (ui_object *obj, void *arg)
{

	obj;
	arg;

	push_ui_screen (credits_screen);
}
Ejemplo n.º 3
0
void notify_main_select_player_button (ui_object *obj, void *arg)
{

	obj;
	arg;

	push_ui_screen (select_player_screen);
}
Ejemplo n.º 4
0
void notify_main_combat_missions_button (ui_object *obj, void *arg)
{

	obj;
	arg;

	set_game_flow (GAME_FLOW_COMBAT_MISSIONS);

	push_ui_screen (game_type_screen);
}
Ejemplo n.º 5
0
void notify_clear_options_screen(void)
{

	store_multiplayer_options ();

	// Save the global options data

	save_global_options_data ();

	// if the graphics display adapter has changed, boot the player out
	{

		int
			flag;

		flag = FALSE;

		if (old_graphics_card_automatic_selection != get_global_graphics_device_selection_automatic ())
		{
			flag = TRUE;
		}
		else
		{
			flag = FALSE;
		}

		if (!old_graphics_card_automatic_selection)
		{
			if (old_graphics_card_selection != get_card_selection_device ())
			{
				flag = TRUE;
			}
			else
			{
				flag = FALSE;
			}
		}

		if (flag)
		{
			push_ui_screen (exit_screen);
		}
		else
		{
			pop_ui_screen (SCREEN_POP_ACTUAL);
		}
	}

	#if DEBUG_MODULE

	debug_filtered_log("Inside clear_options_screen");

	#endif
}
Ejemplo n.º 6
0
void show_options_page(void)
{

//	pop_event (campaign_options_events);

//	initialise_options_screen();

	push_ui_screen (options_screen);

	#if DEBUG_MODULE

	debug_filtered_log("Inside show_options_screen");

	#endif
}
Ejemplo n.º 7
0
void notify_select_player_exit_button (ui_object *obj, void *arg)
{
	if ((int) arg == BUTTON_STATE_UP)
	{
		set_ui_object_redraw (advert_screen, TRUE);

//		pop_ui_screen (SCREEN_POP_ACTUAL);
		push_ui_screen (main_screen);
	}
	else
	{
		set_ui_object_redraw (advert_screen, TRUE);
	}

	set_ui_object_graphic_type (obj, UI_OBJECT_ALPHA_GRAPHIC);
}
Ejemplo n.º 8
0
void init_function (ui_object *obj, void *arg)
{

	set_mouse_off ();

	if ( get_ui_object_drawable ( obj ) )
	{

		if ( main_screen_texture )
		{
	
			destroy_texture_graphic (init_screen_texture);

			init_screen_texture = NULL;
		}
	
		init_screen_texture = create_texture_graphic ( "graphics\\ui\\cohokum\\title.psd" );
	
		set_ui_object_texture_graphic (init_screen, init_screen_texture);
	
		blit_front_buffer_to_render_buffer ();
	
		ui_set_user_function (NULL);
	}
	else
	{
		if (main_screen_texture)
		{
	
			destroy_texture_graphic (init_screen_texture);

			init_screen_texture = NULL;
		}
	}
	
	ui_force_update ();

	full_initialise_game ();

	set_mouse_on ();

	switch (command_line_run_mode)
	{
/*
		case RUN_MODE_AITOOL:
		{

			initialise_aitool ();

			push_ui_screen (aitool_select_map_screen);

			break;
		}
*/
		case RUN_MODE_NORMAL:
		default:
		{

			if (command_line_comms_dedicated_server)
			{

				process_game_initialisation_phases ();
			}
			else
			{
	
				play_cd_music ( CD_MUSIC_TYPE_INTRO );

				#if DEMO_VERSION
					push_ui_screen (advert_screen);
				#else
					push_ui_screen (main_screen);
				#endif
			}

			break;
		}
	}
}