- Timestamp:
- Jan 1, 2005, 12:27:16 PM (20 years ago)
- Location:
- orxonox/branches/updater/src/gui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/updater/src/gui/orxonox_gui.cc
r3305 r3312 173 173 } 174 174 PRINT(0)("\n\n:: %s ::\n", option->title); 175 option->changeOption(); 175 176 176 177 // here follows the rest.... this will be nasty. -
orxonox/branches/updater/src/gui/orxonox_gui_gtk.cc
r3305 r3312 1162 1162 void Button::changeOption(void) 1163 1163 { 1164 1164 // This will possibly be used for ACTIONS ! 1165 1165 } 1166 1166 … … 1245 1245 #ifdef HAVE_GTK2 1246 1246 this->value = (int)gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (this->widget)); 1247 #else /* HAVE_GTK2 */ 1248 char tmpChar[20]; 1249 cout << "\nPlease give me a new value for " << this->title << " [0,1](defualt:" << this->defaultValue << "): "; 1250 cin >> tmpChar; 1251 1252 if ((this->value = atoi(tmpChar))=!0) 1253 this->value = 1; 1247 1254 #endif /* HAVE_GTK2 */ 1248 1255 cout << this->title << " set to: " << this->value << endl; … … 1297 1304 static_cast<Option*>(this)->init(); 1298 1305 1306 this->start = start; 1307 this->end = end; 1299 1308 #ifdef HAVE_GTK2 1300 1309 widget = gtk_hscale_new_with_range (start, end, 5); … … 1355 1364 #ifdef HAVE_GTK2 1356 1365 this->value = (int)gtk_range_get_value(GTK_RANGE(this->widget)); 1366 #else /* HAVE_GTK2 */ 1367 char tmpChar[20]; 1368 cout << "\nPlease give me a new value for " << this->title << " [" <<this->start << "-" << this->end << "](defualt:" << this->defaultValue << "): "; 1369 cin >> tmpChar; 1370 1371 if ((this->value = atoi(tmpChar))> this->end) 1372 this->value = this->end; 1373 if (this->value <= this->start) 1374 this->value = this->start; 1357 1375 #endif /* HAVE_GTK2 */ 1358 1376 cout << this->title << " set to: " << this->value << endl; … … 1470 1488 #ifdef HAVE_GTK2 1471 1489 this->value = (int)gtk_option_menu_get_history (GTK_OPTION_MENU (this->widget)); 1490 #else /* HAVE_GTK2 */ 1491 char tmpChar[20]; 1492 cout << "\nPlease give me a new value for " << this->title << " (defualt:" << this->defaultValue << "): "; 1493 cin >> tmpChar; 1494 this->value = atoi(tmpChar); 1495 1472 1496 #endif /* HAVE_GTK2 */ 1473 1497 cout << this->title << " set to: " << this->value << endl; … … 1571 1595 #ifdef HAVE_GTK2 1572 1596 this->cValue = (char*)gtk_label_get_text (GTK_LABEL(this->widget)); 1597 #else /* HAVE_GTK2 */ 1598 cout << "\nPlease give me a new input for " << this->title << ": "; 1599 cin >> this->cValue; 1573 1600 #endif /* HAVE_GTK2 */ 1574 1601 cout << this->title << " set to: " << this->cValue << endl; -
orxonox/branches/updater/src/gui/orxonox_gui_gtk.h
r3305 r3312 281 281 class Slider : public Option 282 282 { 283 public: 284 Slider(char* slidername,int start, int end); 283 private: 284 int start; 285 int end; 286 public: 287 Slider(char* slidername, int start, int end); 285 288 ~Slider(void); 286 289 void init(int start, int end);
Note: See TracChangeset
for help on using the changeset viewer.