Changeset 1819 in orxonox.OLD for orxonox/branches/bensch/orxonox_gui_exec.c
- Timestamp:
- Apr 14, 2004, 1:46:35 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/bensch/orxonox_gui_exec.c
r1818 r1819 1 #include "orxonox_gui.h" 2 1 #include "orxonox_gui_exec.h" 2 GtkWidget *exec_flags_label; 3 struct settings *exec_orxonox_settings; 3 4 GtkWidget *orxonox_gui_exec_frame (struct settings *orxonox_settings) 4 5 { … … 8 9 GtkWidget *start_button; 9 10 GtkWidget *quit_button; 11 GtkWidget *flags_frame; 12 10 13 11 14 frame = gtk_frame_new ( "Execute-Tags:"); 15 gtk_container_set_border_width (GTK_CONTAINER (frame), 5); 12 16 { 13 17 GtkWidget *orxonox_gui_exec_vbox; 14 orxonox_gui_exec_vbox = gtk_vbox_new (FALSE, 0);18 orxonox_gui_exec_vbox = gtk_vbox_new (FALSE, 5); 15 19 { 16 20 … … 30 34 g_signal_connect(GTK_BUTTON(quit_button), "clicked", G_CALLBACK(gtk_main_quit), NULL); 31 35 gtk_box_pack_start(GTK_BOX (orxonox_gui_exec_vbox), quit_button, FALSE, FALSE, 5); 36 37 38 flags_frame = gtk_frame_new("Orxonox's starting Flags"); 39 { 40 exec_flags_label = gtk_label_new("test"); 41 exec_orxonox_settings = orxonox_settings; 42 orxonox_flags_update(); 43 gtk_container_add (GTK_CONTAINER(flags_frame), exec_flags_label); 44 } 45 gtk_box_pack_start(GTK_BOX (orxonox_gui_exec_vbox), flags_frame, FALSE, FALSE, 5); 32 46 } 33 47 gtk_container_add(GTK_CONTAINER(frame), orxonox_gui_exec_vbox); … … 38 52 } 39 53 54 55 char * orxonox_flags_text (struct settings *orxonox_settings, char *exec_flags_text) 56 { 57 bzero(exec_flags_text, 1); 58 strcat(exec_flags_text, "orxonox "); 59 60 if(!orxonox_settings->video_fullscreen) 61 strcat(exec_flags_text, "--windowed "); 62 if(orxonox_settings->video_wireframe) 63 strcat(exec_flags_text, "--wireframe "); 64 65 if(!orxonox_settings->audio_enable_sound) 66 strcat(exec_flags_text, "--disable_audio "); 67 /* if(orxonox_settings->audio_music_volume <> 80) 68 { 69 strcat(exec_flags_text, "--music_volume="); 70 strcat(exec_flags_text, sprintf("%i ",(int *)orxonox_settings->audio_music_volume)); 71 } 72 */ 73 if(orxonox_settings->audio_effects_volume) 74 strcat(exec_flags_text, "--effects_volume "); 75 76 return (exec_flags_text); 77 } 78 79 void orxonox_flags_update (void) 80 { 81 char exec_flags_text[1024]; 82 gtk_label_set_text (GTK_LABEL(exec_flags_label), orxonox_flags_text (exec_orxonox_settings, exec_flags_text)); 83 return; 84 }
Note: See TracChangeset
for help on using the changeset viewer.