Changeset 1819 in orxonox.OLD for orxonox/branches/bensch
- Timestamp:
- Apr 14, 2004, 1:46:35 AM (21 years ago)
- Location:
- orxonox/branches/bensch
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/bensch/orxonox_gui.c
r1818 r1819 2 2 #include "orxonox_gui_video.h" 3 3 #include "orxonox_gui_audio.h" 4 #include "orxonox_gui_exec.h"5 4 int verbose = 1; 6 5 -
orxonox/branches/bensch/orxonox_gui.h
r1817 r1819 7 7 #include <string.h> 8 8 #include <gtk/gtk.h> 9 10 gint delete_event ( GtkWidget *widget, GdkEvent *event, gpointer data ); 9 11 10 12 struct settings -
orxonox/branches/bensch/orxonox_gui_audio.c
r1818 r1819 10 10 11 11 frame = gtk_frame_new ( "Audio-Options:"); 12 gtk_container_set_border_width (GTK_CONTAINER (frame), 5); 12 13 { 13 14 GtkWidget *orxonox_gui_audio_vbox; -
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 } -
orxonox/branches/bensch/orxonox_gui_exec.h
r1818 r1819 1 1 #ifndef _ORXONOX_GUI_EXEC_H 2 2 #define _ORXONOX_GUI_EXEC_H 3 #include "orxonox_gui.h" 3 4 4 5 GtkWidget *orxonox_gui_exec_frame (struct settings *orxonox_settings); 6 char * orxonox_flags_text (struct settings *orxonox_settings, char *exec_flags_text); 7 void orxonox_flags_update (void); 5 8 6 9 #endif /* _ORXONOX_GUI_EXEC_H */ -
orxonox/branches/bensch/orxonox_gui_video.c
r1817 r1819 1 1 #include "orxonox_gui_video.h" 2 2 3 4 5 3 void video_option_change(GtkWidget *widget, gpointer 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", gtk_button_get_label(widget), data); 9 } 6 10 7 11 /* Drawing The VIDEO_FRAME */ … … 13 17 14 18 frame = gtk_frame_new ( "Video-Options:"); 19 gtk_container_set_border_width (GTK_CONTAINER (frame), 5); 20 15 21 { 16 22 GtkWidget *orxonox_gui_video_vbox; … … 18 24 { 19 25 fullscreen_button = gtk_check_button_new_with_label ("Fullscreen-mode"); 20 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fullscreen_button), orxonox_settings->video_fullscreen); 21 22 /* gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), orxonox_gui_video_fullscreen); 23 */ 26 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (fullscreen_button), orxonox_settings->video_fullscreen); 27 g_signal_connect(GTK_TOGGLE_BUTTON(fullscreen_button), "clicked", G_CALLBACK(video_option_change), &(orxonox_settings->video_fullscreen)); 24 28 gtk_box_pack_start(GTK_BOX (orxonox_gui_video_vbox), fullscreen_button, TRUE, TRUE, 0); 25 29 26 30 wireframe_button = gtk_check_button_new_with_label ("Wireframe-mode"); 27 31 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wireframe_button), orxonox_settings->video_wireframe); 28 /* gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), orxonox_gui_video_Wireframe); 29 */ 32 g_signal_connect(GTK_TOGGLE_BUTTON(wireframe_button), "clicked", G_CALLBACK(video_option_change), &(orxonox_settings->video_wireframe)); 30 33 gtk_box_pack_start(GTK_BOX (orxonox_gui_video_vbox), wireframe_button, TRUE, TRUE, 0); 31 34 -
orxonox/branches/bensch/orxonox_gui_video.h
r1817 r1819 4 4 #include "orxonox_gui.h" 5 5 6 void video_option_change(GtkWidget *widget, gpointer data); 6 7 GtkWidget *orxonox_gui_video_frame (struct settings *orxonox_settings); 7 8
Note: See TracChangeset
for help on using the changeset viewer.