Changeset 3312 in orxonox.OLD for orxonox/branches/updater/src/gui/orxonox_gui_gtk.cc
- Timestamp:
- Jan 1, 2005, 12:27:16 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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;
Note: See TracChangeset
for help on using the changeset viewer.