- Timestamp:
- Apr 14, 2004, 2:42:02 AM (21 years ago)
- Location:
- orxonox/branches/bensch
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/bensch/orxonox_gui_audio.c
r1819 r1821 1 1 #include "orxonox_gui.h" 2 3 void audio_check_button_change(GtkWidget *widget, int* data) 4 { 5 *data = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (widget)); 6 orxonox_flags_update (); 7 if (verbose >=1) 8 printf ("%s changed to %i.\n", (char*) gtk_button_get_label(widget), *data); 9 return; 10 } 11 12 void audio_slider_change(GtkWidget *widget, int* data) 13 { 14 *data = gtk_range_get_value ( GTK_RANGE (widget)); 15 orxonox_flags_update (); 16 if (verbose >=1) 17 printf ("Changed slider to %i.\n", *data); 18 return; 19 } 2 20 3 21 GtkWidget *orxonox_gui_audio_frame (struct settings *orxonox_settings) … … 18 36 enable_sound_button = gtk_check_button_new_with_label ("Enable Sound"); 19 37 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (enable_sound_button), orxonox_settings->audio_enable_sound); 38 g_signal_connect(GTK_TOGGLE_BUTTON(enable_sound_button), "clicked", G_CALLBACK(audio_check_button_change), &(orxonox_settings->audio_enable_sound)); 39 20 40 gtk_box_pack_start(GTK_BOX (orxonox_gui_audio_vbox), enable_sound_button, TRUE, TRUE, 0); 21 41 … … 25 45 gtk_range_set_value ( GTK_RANGE (music_volume_slider), orxonox_settings->audio_music_volume); 26 46 gtk_range_set_update_policy ( GTK_RANGE (music_volume_slider), GTK_UPDATE_DISCONTINUOUS); 27 /* g_signal_connect (GTK_RANGE (music_volume_slider), "valume_changed", G_CALLBACK (video_filter_crop_slider_changed), GINT_TO_POINTER (0));*/47 g_signal_connect (GTK_RANGE (music_volume_slider), "value_changed", G_CALLBACK (audio_slider_change), &(orxonox_settings->audio_music_volume) ); 28 48 gtk_box_pack_start ( GTK_BOX (orxonox_gui_audio_vbox), music_volume_slider, TRUE, TRUE, 0); 29 49 … … 33 53 gtk_range_set_value ( GTK_RANGE (effects_volume_slider), orxonox_settings->audio_effects_volume); 34 54 gtk_range_set_update_policy ( GTK_RANGE (effects_volume_slider), GTK_UPDATE_DISCONTINUOUS); 35 /* g_signal_connect (GTK_RANGE (effects_volume_slider), "valume_changed", G_CALLBACK (video_filter_crop_slider_changed), GINT_TO_POINTER (0));*/55 g_signal_connect (GTK_RANGE (effects_volume_slider), "value_changed", G_CALLBACK (audio_slider_change), &(orxonox_settings->audio_effects_volume) ); 36 56 gtk_box_pack_start ( GTK_BOX (orxonox_gui_audio_vbox), effects_volume_slider, TRUE, TRUE, 0); 37 57 … … 39 59 gtk_container_add(GTK_CONTAINER(frame), orxonox_gui_audio_vbox); 40 60 } 41 42 61 return frame; 43 44 62 } 45 63 -
orxonox/branches/bensch/orxonox_gui_audio.h
r1818 r1821 2 2 #define _ORXONOX_GUI_AUDIO_H 3 3 4 5 void audio_check_button_change(GtkWidget *widget, int* data); 4 6 GtkWidget *orxonox_gui_audio_frame (struct settings *orxonox_settings); 5 7 -
orxonox/branches/bensch/orxonox_gui_exec.c
r1820 r1821 56 56 char * orxonox_flags_text (struct settings *orxonox_settings, char *exec_flags_text) 57 57 { 58 char temp [50]; 58 59 bzero(exec_flags_text, 1); 59 60 strcat(exec_flags_text, "orxonox "); … … 66 67 if(!orxonox_settings->audio_enable_sound) 67 68 strcat(exec_flags_text, "--disable_audio "); 68 /* if(orxonox_settings->audio_music_volume <>80)69 if(orxonox_settings->audio_music_volume != 80) 69 70 { 70 71 strcat(exec_flags_text, "--music_volume="); 71 strcat(exec_flags_text, sprintf("%i ",(int *)orxonox_settings->audio_music_volume)); 72 sprintf(temp, "%i ", (int) orxonox_settings->audio_music_volume); 73 strcat(exec_flags_text, temp); 72 74 } 73 */ 74 if(orxonox_settings->audio_effects_volume) 75 strcat(exec_flags_text, "--effects_volume "); 76 75 if(orxonox_settings->audio_effects_volume != 80) 76 { 77 strcat(exec_flags_text, "--effects_volume= "); 78 sprintf(temp, "%i ", (int) orxonox_settings->audio_effects_volume); 79 strcat(exec_flags_text, temp); 80 } 77 81 return (exec_flags_text); 78 82 }
Note: See TracChangeset
for help on using the changeset viewer.