[1817] | 1 | #include "orxonox_gui_video.h" |
---|
[1809] | 2 | |
---|
[1820] | 3 | void video_option_change(GtkWidget *widget, int* data) |
---|
[1819] | 4 | { |
---|
[1822] | 5 | *data = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); |
---|
[1820] | 6 | orxonox_flags_update (); |
---|
[1819] | 7 | if (verbose >=1) |
---|
[1822] | 8 | printf ("%s changed to %i.\n", gtk_button_get_label(GTK_BUTTON(widget)), *data); |
---|
[1819] | 9 | } |
---|
[1817] | 10 | |
---|
| 11 | /* Drawing The VIDEO_FRAME */ |
---|
| 12 | GtkWidget *orxonox_gui_video_frame (struct settings *orxonox_settings) |
---|
[1809] | 13 | { |
---|
| 14 | GtkWidget *frame; |
---|
[1817] | 15 | GtkWidget *fullscreen_button; |
---|
| 16 | GtkWidget *wireframe_button; |
---|
| 17 | |
---|
[1809] | 18 | frame = gtk_frame_new ( "Video-Options:"); |
---|
[1819] | 19 | gtk_container_set_border_width (GTK_CONTAINER (frame), 5); |
---|
| 20 | |
---|
[1809] | 21 | { |
---|
| 22 | GtkWidget *orxonox_gui_video_vbox; |
---|
| 23 | orxonox_gui_video_vbox = gtk_vbox_new (FALSE, 0); |
---|
| 24 | { |
---|
[1817] | 25 | fullscreen_button = gtk_check_button_new_with_label ("Fullscreen-mode"); |
---|
[1819] | 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)); |
---|
[1817] | 28 | gtk_box_pack_start(GTK_BOX (orxonox_gui_video_vbox), fullscreen_button, TRUE, TRUE, 0); |
---|
[1816] | 29 | |
---|
[1817] | 30 | wireframe_button = gtk_check_button_new_with_label ("Wireframe-mode"); |
---|
| 31 | gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wireframe_button), orxonox_settings->video_wireframe); |
---|
[1819] | 32 | g_signal_connect(GTK_TOGGLE_BUTTON(wireframe_button), "clicked", G_CALLBACK(video_option_change), &(orxonox_settings->video_wireframe)); |
---|
[1817] | 33 | gtk_box_pack_start(GTK_BOX (orxonox_gui_video_vbox), wireframe_button, TRUE, TRUE, 0); |
---|
[1816] | 34 | |
---|
[1809] | 35 | } |
---|
| 36 | gtk_container_add(GTK_CONTAINER(frame), orxonox_gui_video_vbox); |
---|
| 37 | } |
---|
| 38 | |
---|
| 39 | return frame; |
---|
| 40 | |
---|
| 41 | } |
---|
| 42 | |
---|