Changeset 2614 in orxonox.OLD for orxonox/trunk
- Timestamp:
- Oct 22, 2004, 12:52:33 AM (20 years ago)
- Location:
- orxonox/trunk/gui
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/gui/orxonox_gui.cc
r2613 r2614 236 236 } 237 237 238 /** 239 \brief Sets the group name under which all the lower widgets of this will be saved. 240 \param name The name of the group. 241 */ 242 void Packer::setGroupName (char* name) 243 { 244 groupName = name; 245 } 246 247 /** 248 \brief Retrieves the group name under which all the lower widgets of this will be saved. 249 \returns name The name of the group. 250 */ 251 char* Packer::getGroupName (void) 252 { 253 return groupName; 254 } 255 238 256 /* CONTAINERS */ 239 257 … … 293 311 is_option = -1; 294 312 label = ""; 313 this->setGroupName (""); 295 314 next = NULL; 296 315 down = NULL; … … 365 384 is_option = -1; 366 385 label = ""; 386 this->setGroupName(""); 367 387 next = NULL; 368 388 down = NULL; … … 408 428 is_option = -1; 409 429 label = "eventBox"; 430 this->setGroupName(""); 410 431 next = NULL; 411 432 down = NULL; … … 451 472 is_option = -2; 452 473 label = "box"; 474 this->setGroupName(""); 453 475 next = NULL; 454 476 down = NULL; -
orxonox/trunk/gui/orxonox_gui.h
r2605 r2614 68 68 public: 69 69 Widget* down; //!< this points to the Widget below this. 70 71 void init(void); 70 char* groupName; //!< For each Packer you can specify a Groupname under which the lowerWidgets will be saved. 71 72 void init(void); 73 void setGroupName (char* name); 74 char* getGroupName (void); 72 75 }; 73 76 -
orxonox/trunk/gui/orxonox_gui_audio.cc
r2595 r2614 33 33 audioFrame = new Frame ("Audio-Options:"); 34 34 audioBox = new Box ('v'); 35 audioFrame->setGroupName ("audio"); 35 36 36 37 enableSound = new CheckButton ("Disable Sound"); -
orxonox/trunk/gui/orxonox_gui_exec.cc
r2605 r2614 38 38 execFrame = new Frame ("Execute-Tags:"); 39 39 execBox = new Box ('v'); 40 execFrame->setGroupName ("misc"); 40 41 41 42 start = new Button ("Start"); … … 119 120 void OrxonoxGuiExec::writeFileText (Widget* widget) 120 121 { 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 121 126 if (widget->is_option >= 1) 122 127 if (strcmp (static_cast<Option*>(widget)->flag_name, "") || strcmp (static_cast<Option*>(widget)->flag_name_short, "")) … … 126 131 sprintf (Buffer, "%s", static_cast<Option*>(widget)->label); 127 132 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; 129 134 while (space2under = strchr(Buffer, ' ')) 130 135 { … … 133 138 fprintf (CONFIG_FILE, "%s = %i\n", Buffer, static_cast<Option*>(widget)->value); 134 139 } 135 switch (widget->is_option)140 if (widget->is_option<0) 136 141 { 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); 143 143 } 144 144 -
orxonox/trunk/gui/orxonox_gui_video.cc
r2595 r2614 32 32 videoFrame = new Frame ("Video-Options:"); 33 33 videoBox = new Box ('v'); 34 videoFrame->setGroupName("video"); 34 35 35 36 fullscreen = new CheckButton ("Fullscreen-mode");
Note: See TracChangeset
for help on using the changeset viewer.