Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 1, 2005, 12:27:16 PM (20 years ago)
Author:
bensch
Message:

orxonox/branches/updater: now it is possible to change the options without the grafical Interface through the GUI, but it is very lousy. Try it\!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/updater/src/gui/orxonox_gui_gtk.cc

    r3305 r3312  
    11621162void Button::changeOption(void)
    11631163{
    1164  
     1164  // This will possibly be used for ACTIONS !
    11651165}
    11661166
     
    12451245#ifdef HAVE_GTK2
    12461246  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;
    12471254#endif /* HAVE_GTK2 */
    12481255  cout << this->title << " set to: " << this->value << endl;
     
    12971304  static_cast<Option*>(this)->init();
    12981305
     1306  this->start = start;
     1307  this->end = end;
    12991308#ifdef HAVE_GTK2
    13001309 widget = gtk_hscale_new_with_range (start, end, 5);
     
    13551364#ifdef HAVE_GTK2
    13561365  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;
    13571375#endif /* HAVE_GTK2 */
    13581376  cout << this->title << " set to: " << this->value << endl;
     
    14701488#ifdef HAVE_GTK2
    14711489  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
    14721496#endif /* HAVE_GTK2 */
    14731497  cout << this->title << " set to: " << this->value << endl;
     
    15711595#ifdef HAVE_GTK2
    15721596  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;
    15731600#endif /* HAVE_GTK2 */
    15741601  cout << this->title << " set to: " << this->cValue << endl;
Note: See TracChangeset for help on using the changeset viewer.