Changeset 3161 in orxonox.OLD for orxonox/trunk/gui/orxonox_gui_exec.cc
- Timestamp:
- Dec 13, 2004, 2:10:38 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/gui/orxonox_gui_exec.cc
r3147 r3161 128 128 && (static_cast<Option*>(widget)->saveable) ) 129 129 || (widget->isOption<0 130 && st rcmp (static_cast<Packer*>(widget)->getGroupName(), ""))))130 && static_cast<Packer*>(widget)->getGroupName()))) 131 131 { 132 132 fprintf (CONFIG_FILE, " ", depth); … … 137 137 if (widget->isOption <0) 138 138 { 139 if (st rcmp (static_cast<Packer*>(widget)->getGroupName(), ""))139 if (static_cast<Packer*>(widget)->getGroupName()) 140 140 { 141 141 fprintf (CONFIG_FILE, "[%s]\n", static_cast<Packer*>(widget)->getGroupName()); … … 155 155 char Buffer[256]; 156 156 char* space2under; 157 s printf (Buffer, "%s", static_cast<Option*>(widget)->label);157 strcpy (Buffer, static_cast<Option*>(widget)->label); 158 158 if (strchr (Buffer, '_')) 159 159 cout << "Warning Optionname" << Buffer << " is not Valid for Saving, because it includes an underscore" << endl; 160 160 while (space2under = strchr(Buffer, ' ')) 161 161 { 162 sp rintf (space2under, "_%s", space2under+1);162 space2under[0] = '_'; 163 163 } 164 fprintf (CONFIG_FILE, "%s = %i\n", Buffer, static_cast<Option*>(widget)->value); 164 if (widget->isOption <=3) 165 fprintf (CONFIG_FILE, "%s = %d\n", Buffer, static_cast<Option*>(widget)->value); 166 else if (widget->isOption == 5) 167 fprintf (CONFIG_FILE, "%s = %s\n", Buffer, static_cast<OptionLabel*>(widget)->cValue); 165 168 } 166 169 … … 184 187 while (fscanf (CONFIG_FILE, "%s", Buffer) != EOF) 185 188 { 189 // group-search // 186 190 if (!strncmp (Buffer, "[", 1)) 187 191 { … … 192 196 } 193 197 } 198 // option-setting // 194 199 if (!strcmp (Buffer, "=")) 195 200 { … … 248 253 if (widget->isOption < 0) 249 254 { 250 if ( !strcmp(groupName, static_cast<Packer*>(widget)->getGroupName()))255 if (static_cast<Packer*>(widget)->getGroupName() && !strcmp(groupName, static_cast<Packer*>(widget)->getGroupName())) 251 256 { 252 257 return widget;
Note: See TracChangeset
for help on using the changeset viewer.