Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2614 in orxonox.OLD for orxonox/trunk/gui/orxonox_gui_exec.cc


Ignore:
Timestamp:
Oct 22, 2004, 12:52:33 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk/gui: added simple config-file stuffing. (only save needs it now, load still has to do it)

File:
1 edited

Legend:

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

    r2605 r2614  
    3838  execFrame = new Frame ("Execute-Tags:");
    3939  execBox = new Box ('v');
     40  execFrame->setGroupName ("misc");
    4041 
    4142  start = new Button ("Start");
     
    119120void OrxonoxGuiExec::writeFileText (Widget* widget)
    120121{
     122  if (widget->is_option <0)
     123    if (strcmp (static_cast<Packer*>(widget)->getGroupName(), ""))
     124      fprintf (CONFIG_FILE, "[%s]\n", static_cast<Packer*>(widget)->getGroupName());
     125
    121126  if (widget->is_option >= 1)
    122127    if  (strcmp (static_cast<Option*>(widget)->flag_name, "") || strcmp (static_cast<Option*>(widget)->flag_name_short, ""))
     
    126131        sprintf (Buffer, "%s", static_cast<Option*>(widget)->label);
    127132        if (strchr (Buffer, '_'))
    128           cout << "Warning Optionname" << Buffer << " is not Valid for Saving, because it includes an underscore" << endl; 
     133          cout << "Warning Optionname" << Buffer << " is not Valid for Saving, because it includes an underscore" << endl;
    129134        while (space2under = strchr(Buffer, ' '))
    130135          {
     
    133138        fprintf (CONFIG_FILE, "%s = %i\n", Buffer, static_cast<Option*>(widget)->value);
    134139      }
    135   switch (widget->is_option)
     140  if (widget->is_option<0)
    136141    {
    137     case -1:
    138       writeFileText (static_cast<Container*>(widget)->down);
    139       break;
    140     case -2:
    141       writeFileText (static_cast<Box*>(widget)->down);
    142       break;
     142      writeFileText (static_cast<Packer*>(widget)->down);
    143143    }
    144144 
Note: See TracChangeset for help on using the changeset viewer.