Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/showroom/gui/orxonox_gui_video.c @ 1896

Last change on this file since 1896 was 1864, checked in by bensch, 21 years ago

orxonox/trunk: merged gui to trunk

File size: 1.6 KB
Line 
1#include "orxonox_gui_video.h"
2
3void video_option_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", gtk_button_get_label(GTK_BUTTON(widget)), *data);
9}
10
11/* Drawing The VIDEO_FRAME */
12GtkWidget *orxonox_gui_video_frame (struct settings *orxonox_settings)
13{
14  GtkWidget *frame;
15  GtkWidget *fullscreen_button;
16  GtkWidget *wireframe_button;
17 
18  frame = gtk_frame_new ( "Video-Options:");
19  gtk_container_set_border_width (GTK_CONTAINER (frame), 5);
20
21  {
22    GtkWidget *orxonox_gui_video_vbox;
23    orxonox_gui_video_vbox = gtk_vbox_new (FALSE, 0);
24    {
25        fullscreen_button = gtk_check_button_new_with_label ("Fullscreen-mode");
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));
28        gtk_box_pack_start(GTK_BOX (orxonox_gui_video_vbox), fullscreen_button, TRUE, TRUE, 0);
29
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);
32        g_signal_connect(GTK_TOGGLE_BUTTON(wireframe_button), "clicked", G_CALLBACK(video_option_change), &(orxonox_settings->video_wireframe));
33        gtk_box_pack_start(GTK_BOX (orxonox_gui_video_vbox), wireframe_button, TRUE, TRUE, 0);
34       
35    }
36    gtk_container_add(GTK_CONTAINER(frame), orxonox_gui_video_vbox);
37  }
38
39  return frame;
40
41}
42
Note: See TracBrowser for help on using the repository browser.