Beispiel #1
0
void notify_show_realism_page (void)
{
    set_ui_object_text (co_pilot_target_option_button, option_cpg_text [get_global_cpg_assist_type ()]);

#if DEBUG_MODULE
    debug_filtered_log ("cpg_assist: %d text: %s",get_global_cpg_assist_type (), option_cpg_text [get_global_cpg_assist_type ()]);
#endif

    set_ui_object_text (co_pilot_ecm_option_button, option_boolean_text [get_global_auto_counter_measures ()]);

#if DEBUG_MODULE
    debug_filtered_log ("acm: %d text: %s", get_global_auto_counter_measures (), option_boolean_text [get_global_auto_counter_measures ()]);
#endif

    set_ui_object_text (avionics_option_button, option_avionics_text [get_global_simple_avionics ()]);

#if DEBUG_MODULE
    debug_filtered_log ("avionics: %d text: %s", get_global_simple_avionics (), option_avionics_text [get_global_simple_avionics ()]);
#endif

    set_ui_object_text (difficulty_option_button, option_difficulty_text [get_global_difficulty_level () - 1]);

#if DEBUG_MODULE
    debug_filtered_log ("diff: %d text: %s", get_global_difficulty_level (), option_difficulty_text [get_global_difficulty_level () - 1]);
#endif

    set_ui_object_text (cpg_report_targets_button, option_cpg_report_targets_text[global_co_pilot_scans_for_targets]);

    display_options_page (OPTIONS_PAGE_REALISM);
#if DEBUG_MODULE
    debug_filtered_log("Inside show_realism_page");
#endif
}
Beispiel #2
0
void notify_multi_player_setup (void)
{

	connection_data_type
		*this_connection;

	char
		text [10];

//	if ( get_ui_object_drawable ( obj ) )
//	{

		this_connection = direct_play_get_connection_data ();

		blit_front_buffer_to_render_buffer ();


		// Setup the service provider cycle button
#ifdef _WIN32
		if ( this_connection->service_provider.name )
		{
			if ( memncmp ( ( char * ) this_connection->service_provider.guid, ( char * ) &DPSPGUID_TCPIP, sizeof ( GUID ) ) == TRUE )
			{
				set_ui_object_text (connection_type_button, get_trans("MP_INTERNET"));
			}
			else if ( memncmp ( ( char * ) this_connection->service_provider.guid, ( char * ) &DPSPGUID_SERIAL, sizeof ( GUID ) ) == TRUE )
			{
				set_ui_object_text (connection_type_button, get_trans("MP_SERIAL"));
			}
			else if ( memncmp ( ( char * ) this_connection->service_provider.guid, ( char * ) &DPSPGUID_MODEM, sizeof ( GUID ) ) == TRUE )
			{
				set_ui_object_text (connection_type_button, get_trans("MP_MODEM"));
			}
			else if ( memncmp ( ( char * ) this_connection->service_provider.guid, ( char * ) &DPSPGUID_IPX, sizeof ( GUID ) ) == TRUE )
			{
				set_ui_object_text (connection_type_button, get_trans("MP_IPX"));
			}
        }
		else
		{
			set_ui_object_text (connection_type_button, get_trans ("MP_NO_SERVICE_PROVIDER"));
		}
#elif defined __unix__
if ( this_connection->service_provider.name )
		{
/*ö			if ( memncmp ( ( char * ) this_connection->service_provider.guid, ( char * ) &DPSPGUID_TCPIP, sizeof ( int ) ) == TRUE )
			{
				set_ui_object_text (connection_type_button, get_trans("MP_INTERNET"));
			}
			else if ( memncmp ( ( char * ) this_connection->service_provider.guid, ( char * ) &DPSPGUID_SERIAL, sizeof ( int ) ) == TRUE )
			{
				set_ui_object_text (connection_type_button, get_trans("MP_SERIAL"));
			}
			else if ( memncmp ( ( char * ) this_connection->service_provider.guid, ( char * ) &DPSPGUID_MODEM, sizeof ( int ) ) == TRUE )
			{
				set_ui_object_text (connection_type_button, get_trans("MP_MODEM"));
			}
			else if ( memncmp ( ( char * ) this_connection->service_provider.guid, ( char * ) &DPSPGUID_IPX, sizeof ( int ) ) == TRUE )
			{
				set_ui_object_text (connection_type_button, get_trans("MP_IPX"));
			}*/
        }
		else
		{
			set_ui_object_text (connection_type_button, get_trans ("MP_NO_SERVICE_PROVIDER"));
		}
#endif
		preprocess_translation_object_size (connection_type_bdrop, connection_type_button, NULL, 0, RESIZE_OPTION_BOX_TITLE);

		// initialise modem to first in list (? Shouldn't we store the current modem elsewhere - ie globally ?)

		current_modem = modem_name_list;

		if (!current_modem)
		{
			set_ui_object_text (modem_type_button, "No Modem Installed");
		}
		else
		{
			set_ui_object_text (modem_type_button, current_modem->name);
		}

		// Com port button

		sprintf (text, "%d", get_global_comms_port ());

		set_ui_object_text (com_port_button, text);

		// Baud rate

		set_ui_object_text (baud_rate_button, baud_rate_text [get_global_baud_rate () - 1]);

		// Stop bits

		set_ui_object_text (stop_bits_button, stop_bits_text [get_global_stop_bits () - 1]);

		// Parity

		set_ui_object_text (parity_button, parity_text [get_global_parity () - 1]);

		// Flow

		set_ui_object_text (flow_button, flow_text [get_global_flow () - 1]);

		// Phone Number

		set_ui_object_text (phone_number_text_obj, global_options.phone_number);

		// IP Address

		set_ui_object_text (ip_address_text_obj, global_options.ip_address);


		// Now setup the connection type areas

		set_multiplayer_options_display ();


		// Lastly load in the stuff for the screen
/*
		if ( multiplayer_screen_graphic )
		{

			destroy_texture_graphic ( multiplayer_screen_graphic );

			multiplayer_screen_graphic = NULL;
		}

		multiplayer_screen_graphic = create_texture_graphic ( "graphics\\ui\\cohokum\\multi.psd" );

		set_ui_object_texture_graphic ( multi_player_setup_area, multiplayer_screen_graphic );

		blit_front_buffer_to_render_buffer ();

		reset_time_values ( options_screen );
*/
//	}
//	else
//	{
/*
		if ( multiplayer_screen_graphic )
		{

			destroy_texture_graphic ( multiplayer_screen_graphic );

			multiplayer_screen_graphic = NULL;
		}
*/
//	}

	display_options_page (OPTIONS_PAGE_MULTIPLAYER);
}
Beispiel #3
0
void notify_show_controller_page (void)
{

	// initialise button text

	if ( (get_global_cyclic_input () == JOYSTICK_INPUT) && (number_of_joystick_devices) )
	{
		set_ui_object_text (cyclic_option_button, option_joystick_text[1]);
	}
	else
	{
		set_ui_object_text (cyclic_option_button, option_joystick_text[0]);
	}

	if ( (get_global_collective_input () == THROTTLE_INPUT) && (number_of_joystick_devices) )
	{
		set_ui_object_text (collective_option_button, option_throttle_text[1]);
	}
	else
	{
		set_ui_object_text (collective_option_button, option_throttle_text[0]);
	}

	if ( (get_global_pedal_input () == RUDDER_INPUT) && (number_of_joystick_devices) )
	{
		set_ui_object_text (pedal_option_button, option_pedal_text[1]);
	}
	else
	{
		set_ui_object_text (pedal_option_button, option_pedal_text[0]);
	}

	if (get_global_joystick_device_index () == -1)
	{
		set_ui_object_font_type (device_option_button, UI_FONT_THICK_ITALIC_ARIAL_18);

		set_ui_object_text (device_option_button, no_joystick_text);

		preprocess_translation_object_size (device_graphic_area, device_option_button, &no_joystick_text, 1, RESIZE_OPTION_CYCLE_BUTTON);
	}
	else
	{
		char
			*name[1];

		set_ui_object_text (device_option_button, joystick_devices[get_global_joystick_device_index ()].device_name);

		name[0] = &joystick_devices[get_global_joystick_device_index ()].device_name;

		preprocess_translation_object_size (device_graphic_area, device_option_button, name, 1, RESIZE_OPTION_CYCLE_BUTTON);
	}

	set_ui_object_text (reverse_throttle_button, option_boolean_text [get_global_dynamics_options_reverse_throttle_input ()]);

	set_ui_object_text (keyboard_assist_option_button, option_boolean_text [get_global_dynamics_options_keyboard_assistance ()]);

	display_options_page(OPTIONS_PAGE_CONTROLLER);

	#if DEBUG_MODULE
		debug_filtered_log("Inside show_controller_page");
	#endif
}