Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2739 in orxonox.OLD


Ignore:
Timestamp:
Nov 6, 2004, 4:51:59 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk/gui: modified savable rutine. now a widget has to be set saveable, otherwise it won't be saved

Location:
orxonox/trunk/gui
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/gui/orxonox_gui.cc

    r2737 r2739  
    552552  flag_name = "";
    553553  flag_name_short = "";
     554  saveable = false;
    554555  default_value = 0;
    555556
  • orxonox/trunk/gui/orxonox_gui.h

    r2737 r2739  
    188188  char* flag_name_short; //!< like flag_name but shorter
    189189  int default_value; //!< A default value is good, for hiding a option if it is not needed. (hidden if value == default_value)
     190  bool saveable;
    190191
    191192  void setFlagName (char* flagname, int defaultvalue);
  • orxonox/trunk/gui/orxonox_gui_audio.cc

    r2614 r2739  
    3737  enableSound = new CheckButton ("Disable Sound");
    3838  enableSound->setFlagName ("no-sound", 0);
     39  enableSound->saveable = true;
    3940  audioBox->fill (enableSound);
    4041  Label* musicVolumeLabel = new Label ("Music Volume");
     
    4243  musicVolume = new Slider ("Music Volume", 0, 100);
    4344  musicVolume->setFlagName ("music-volume", "m", 80);
     45  musicVolume->saveable = true;
    4446  audioBox->fill (musicVolume);
    4547  Label* effectsVolumeLabel = new Label ("Effects Volume");
     
    4749  effectsVolume = new Slider ("Effects Volume", 0, 100);
    4850  effectsVolume->setFlagName ("effects-volume", "e", 80);
     51  effectsVolume->saveable = true;
    4952  audioBox->fill (effectsVolume);
    5053
  • orxonox/trunk/gui/orxonox_gui_exec.cc

    r2635 r2739  
    4545  saveSettings = new CheckButton ("Save Settings");
    4646  saveSettings->value = 1;
     47  saveSettings->saveable = true;
    4748  execBox->fill (saveSettings);
    4849  verboseMode = new Menu ("verbose mode", "no output", "verbose", "debug", "lastItem");
    4950  verboseMode->setFlagName ("verbose", "v", 0);
     51  verboseMode->saveable = true;
    5052  execBox->fill (verboseMode);
    5153  alwaysShow = new CheckButton ("Always Show this Menu");
    5254  alwaysShow->setFlagName ("gui", "g", 0);
     55  alwaysShow->saveable = true;
    5356  execBox->fill (alwaysShow);
    5457  quit = new Button ("Quit");
     
    98101int OrxonoxGuiExec::shouldsave ()
    99102{
    100   return ( static_cast<Option*>(saveSettings)->value);
     103  return (static_cast<Option*>(saveSettings)->value);
    101104}
    102105
     
    123126  int counter = 0;
    124127  while (counter < depth && ((widget->is_option>0
    125                               && (strcmp (static_cast<Option*>(widget)->flag_name, "")
    126                                   || strcmp (static_cast<Option*>(widget)->flag_name_short, "")) )
     128                              && (static_cast<Option*>(widget)->saveable) )
    127129                             || (widget->is_option<0
    128130                                 && strcmp (static_cast<Packer*>(widget)->getGroupName(), ""))))
     
    148150 
    149151  if (widget->is_option >= 1)
    150     if  (strcmp (static_cast<Option*>(widget)->flag_name, "") || strcmp (static_cast<Option*>(widget)->flag_name_short, ""))
     152    if  (static_cast<Option*>(widget)->saveable)
    151153      {
    152154        char Buffer[256];
  • orxonox/trunk/gui/orxonox_gui_video.cc

    r2614 r2739  
    3636  fullscreen = new CheckButton ("Fullscreen-mode");
    3737  fullscreen->setFlagName ("windowed", "q", 1);
     38  fullscreen->saveable = true;
    3839  videoBox->fill (fullscreen);
    3940  wireframe = new CheckButton ("WireFrame-mode");
    4041  wireframe->setFlagName ("wireframe", "w", 0);
     42  wireframe->saveable = true;
    4143  videoBox->fill (wireframe);
    4244
Note: See TracChangeset for help on using the changeset viewer.