Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3288 in orxonox.OLD for orxonox/branches/updater/src/gui


Ignore:
Timestamp:
Dec 26, 2004, 3:22:05 AM (20 years ago)
Author:
bensch
Message:

orxonox/branches/updater: saveable flag is now protected

Location:
orxonox/branches/updater/src/gui
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/updater/src/gui/orxonox_gui_audio.cc

    r2739 r3288  
    3737  enableSound = new CheckButton ("Disable Sound");
    3838  enableSound->setFlagName ("no-sound", 0);
    39   enableSound->saveable = true;
     39  enableSound->saveability();
    4040  audioBox->fill (enableSound);
    4141  Label* musicVolumeLabel = new Label ("Music Volume");
     
    4343  musicVolume = new Slider ("Music Volume", 0, 100);
    4444  musicVolume->setFlagName ("music-volume", "m", 80);
    45   musicVolume->saveable = true;
     45  musicVolume->saveability();
    4646  audioBox->fill (musicVolume);
    4747  Label* effectsVolumeLabel = new Label ("Effects Volume");
     
    4949  effectsVolume = new Slider ("Effects Volume", 0, 100);
    5050  effectsVolume->setFlagName ("effects-volume", "e", 80);
    51   effectsVolume->saveable = true;
     51  effectsVolume->saveability();
    5252  audioBox->fill (effectsVolume);
    5353
  • orxonox/branches/updater/src/gui/orxonox_gui_exec.cc

    r3260 r3288  
    4747  saveSettings = new CheckButton ("Save Settings");
    4848  saveSettings->value = 1;
    49   saveSettings->saveable = true;
     49  saveSettings->saveability();
    5050  execBox->fill (saveSettings);
    5151  verboseMode = new Menu ("verbose mode", "no output", "error", "warning", "info", "lastItem");
    5252  verboseMode->setFlagName ("verbose", "v", 0);
    53   verboseMode->saveable = true;
     53  verboseMode->saveability();
    5454  execBox->fill (verboseMode);
    5555  alwaysShow = new CheckButton ("Always Show this Menu");
    5656  alwaysShow->setFlagName ("gui", "g", 0);
    57   alwaysShow->saveable = true;
     57  alwaysShow->saveability();
    5858  execBox->fill (alwaysShow);
    5959  quit = new Button ("Quit");
     
    131131  int counter = 0;
    132132  while (counter < depth && ((widget->isOption>0
    133                               && (static_cast<Option*>(widget)->saveable) )
     133                              && (static_cast<Option*>(widget)->isSaveable()) )
    134134                             || (widget->isOption<0
    135135                                 && static_cast<Packer*>(widget)->getGroupName())))
     
    156156  //    printf ("%s\n",widget->label);
    157157  if (widget->isOption >= 1)
    158     if  (static_cast<Option*>(widget)->saveable)
     158    if  (static_cast<Option*>(widget)->isSaveable())
    159159      {
    160160        char Buffer[256];
  • orxonox/branches/updater/src/gui/orxonox_gui_gtk.cc

    r3287 r3288  
    708708}
    709709
     710/**
     711   \brief Sets the saveable-state of the option to true.
     712*/
     713void Option::saveability(void)
     714{
     715  this->saveable = true;
     716}
     717
     718/**
     719   \brief Sets the saveable-state of the option.
     720   \param isSaveable the saveable-state to set.
     721*/
     722void Option::saveability(bool isSaveable)
     723{
     724  this->saveable = isSaveable;
     725}
     726
     727/**
     728   \returns The saveable-state.
     729*/
     730bool Option::isSaveable(void)
     731{
     732  return this->saveable;
     733}
    710734
    711735/* BUTTON */
  • orxonox/branches/updater/src/gui/orxonox_gui_gtk.h

    r3287 r3288  
    193193class Option : public Widget
    194194{
     195 protected:
     196  bool saveable;  //!< Options can be Saved.
     197 
    195198 public:
    196199  //virtual gint OptionChange (GtkWidget* widget, GdkEvent* event, gpointer data);
     
    201204  char* flagNameShort; //!< like flag_name but shorter
    202205  int defaultValue; //!< A default value is good, for hiding a option if it is not needed. (hidden if value == default_value)
    203   bool saveable;  //!< Options can be Saved.
    204 
     206
     207  void saveability(void);
     208  void saveability(bool isSaveable);
     209  bool isSaveable(void);
    205210  void setFlagName (char* flagname, int defaultvalue);
    206211  void setFlagName (char* flagname, char* flagnameshort, int defaultvalue);
  • orxonox/branches/updater/src/gui/orxonox_gui_keys.cc

    r3187 r3288  
    114114  inputKey[key]->pKeyButton = new Button(name);
    115115  inputKey[key]->pKeyOLabel = new OptionLabel (name, name);
    116   inputKey[key]->pKeyOLabel->saveable = true;
     116  inputKey[key]->pKeyOLabel->saveability();
    117117
    118118#ifdef HAVE_GTK2
  • orxonox/branches/updater/src/gui/orxonox_gui_update.cc

    r3286 r3288  
    5353  this->updateBox->fill(this->autoUpdate);
    5454  this->autoUpdate->setFlagName ("update", "u", 0);
    55   this->autoUpdate->saveable = true;
     55  this->autoUpdate->saveability();
    5656
    5757  this->updateSourceWindowCreate ();
  • orxonox/branches/updater/src/gui/orxonox_gui_video.cc

    r3187 r3288  
    3838  fullscreen = new CheckButton ("Fullscreen-mode");
    3939  fullscreen->setFlagName ("windowed", "q", 1);
    40   fullscreen->saveable = true;
     40  fullscreen->saveability();
    4141  videoBox->fill (fullscreen);
    4242  wireframe = new CheckButton ("WireFrame-mode");
    4343  wireframe->setFlagName ("wireframe", "w", 0);
    44   wireframe->saveable = true;
     44  wireframe->saveability();
    4545  videoBox->fill (wireframe);
    4646
Note: See TracChangeset for help on using the changeset viewer.