Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1819 in orxonox.OLD for orxonox/branches/bensch/orxonox_gui_exec.c


Ignore:
Timestamp:
Apr 14, 2004, 1:46:35 AM (21 years ago)
Author:
bensch
Message:

orxonox/branches/bensch: added flags-frame

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"
     2GtkWidget *exec_flags_label;
     3struct settings *exec_orxonox_settings;
    34GtkWidget *orxonox_gui_exec_frame (struct settings *orxonox_settings)
    45{
     
    89  GtkWidget *start_button;
    910  GtkWidget *quit_button;
     11  GtkWidget *flags_frame;
     12
    1013
    1114  frame = gtk_frame_new ( "Execute-Tags:");
     15  gtk_container_set_border_width (GTK_CONTAINER (frame), 5);
    1216  {
    1317    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);
    1519    {
    1620
     
    3034        g_signal_connect(GTK_BUTTON(quit_button), "clicked", G_CALLBACK(gtk_main_quit), NULL);
    3135        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);
    3246    }
    3347    gtk_container_add(GTK_CONTAINER(frame), orxonox_gui_exec_vbox);
     
    3852}
    3953
     54
     55char * 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
     79void 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.