Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 9, 2005, 2:41:38 PM (20 years ago)
Author:
bensch
Message:

orxonox/branches/updater: made the loading and saving more modular.
thanks to patrick I now know the real meaning of virtual members.

File:
1 edited

Legend:

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

    r3379 r3464  
    5050  this->saveSettings->saveability();
    5151  this->execBox->fill(this->saveSettings);
    52   this->verboseMode = new Menu("verbose mode", "no output", "error", "warning", "info", "lastItem");
     52  this->verboseMode = new Menu("verbose mode", "nothing", "error", "warning", "info", "lastItem");
    5353  this->verboseMode->setFlagName("verbose", "v", 0);
    5454  this->verboseMode->saveability();
     
    190190            space2under[0] = '_';
    191191          }
    192         if(widget->isOption <=3)
    193           fprintf(CONFIG_FILE, "%s = %d\n", Buffer, static_cast<Option*>(widget)->value);
    194         else if(widget->isOption == 5)
    195           fprintf(CONFIG_FILE, "%s = %s\n", Buffer, static_cast<OptionLabel*>(widget)->cValue);
     192          fprintf(CONFIG_FILE, "%s = %s\n", Buffer, static_cast<Option*>(widget)->save());
    196193      }
    197194
     
    259256    {
    260257      PRINT(3)("Located Option %s.\n", widget->title);
    261       if(widget->isOption >= 1 && widget->isOption <= 3)
    262         {
    263           static_cast<Option*>(widget)->value = atoi(info->variableValue);
    264           static_cast<Option*>(widget)->redraw(); //!< \todo change this to setValue.
    265         }
    266       else if(widget->isOption == 5)
    267         static_cast<OptionLabel*>(widget)->setValue(info->variableValue);
     258      if(widget->isOption >= 1)
     259          static_cast<Option*>(widget)->load(info->variableValue);
    268260    }
    269261}
Note: See TracChangeset for help on using the changeset viewer.