- Timestamp:
- Dec 13, 2004, 2:12:42 AM (20 years ago)
- Location:
- orxonox/trunk/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/gui/orxonox_gui_exec.cc
r3161 r3162 184 184 char Buffer[256] = ""; 185 185 char Variable[256]= ""; 186 intValue;186 char* Value; 187 187 while (fscanf (CONFIG_FILE, "%s", Buffer) != EOF) 188 188 { … … 206 206 207 207 fscanf (CONFIG_FILE, "%s", Buffer); 208 Value = atoi(Buffer);208 Value = Buffer; 209 209 readFileText (groupWidget, Variable, Value, 0); 210 210 sprintf (Variable, ""); … … 222 222 \param depth the depth of the local Widget 223 223 */ 224 void OrxonoxGuiExec::readFileText (Widget* widget, char* variableName, int variableValue, int depth) 225 { 226 if (widget->isOption >= 1) 227 if (!strcmp (static_cast<Option*>(widget)->label, variableName)) 228 static_cast<Option*>(widget)->value = variableValue; 229 224 void OrxonoxGuiExec::readFileText (Widget* widget, char* variableName, char* variableValue, int depth) 225 { 226 if (widget->isOption >= 1 && widget->isOption <= 3) 227 { 228 if (!strcmp (static_cast<Option*>(widget)->label, variableName)) 229 static_cast<Option*>(widget)->value = atoi(variableValue); 230 } 231 else if (widget->isOption == 5) 232 { 233 if (!strcmp (static_cast<Option*>(widget)->label, variableName)) 234 static_cast<OptionLabel*>(widget)->setValue(variableValue); 235 } 230 236 if (widget->isOption < 0) 231 237 { -
orxonox/trunk/gui/orxonox_gui_exec.h
r2634 r3162 35 35 void writeFileText (Widget* widget, int depth); 36 36 void readFromFile (Widget* widget); 37 void readFileText (Widget* widget, char* variableName, intvariableValue, int depth);37 void readFileText (Widget* widget, char* variableName, char* variableValue, int depth); 38 38 Widget* locateGroup(Widget* widget, char* groupName, int depth); 39 39
Note: See TracChangeset
for help on using the changeset viewer.