Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 3, 2005, 12:10:23 PM (19 years ago)
Author:
bensch
Message:

orxonox/branches/updater: moved some stuff to gui-gtk.

File:
1 edited

Legend:

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

    r3312 r3313  
    120120  else
    121121    {
    122 #ifdef HAVE_GTK2
    123122      mainloopGUI();
    124 #else /* HAVE_GTK2 */
    125       char boolAns = 'y';
    126       char ans[10];
    127       while(true)
    128         {
    129           PRINT(0)(" Listing all the Orxonox Options: \n");
    130           PRINT(0)("  #############################\n");
    131           Window::mainWindow->walkThrough(Widget::listOptionsAndGroups, 1);
    132          
    133           PRINT(0)("\nDo you want change any of the above values now? [Yn] ");
    134           cin >>boolAns ;
    135           if (boolAns =='n' || boolAns=='N')
    136             break;
    137 
    138           PRINT(0)("\n Listing all groups\n");
    139           PRINT(0)("  #################\n");
    140           int groupCount = 0;
    141           Window::mainWindow->walkThrough(Widget::listGroups, &groupCount, 1);
    142          
    143           PRINT(0)("\nIn which Group? [1-%d] ", groupCount);
    144           Packer* group;
    145           while(true)
    146             {
    147               cin >> ans;
    148               int ansIp = atoi(ans);
    149               if (ansIp <= groupCount)
    150                 {
    151                   group = static_cast<Packer*>(Window::mainWindow->findGroupByNumber(&ansIp, 1));
    152                 break;
    153                 }
    154               else
    155                 PRINT(0)("\nChoose a smaler Number please: [1-%d] ", groupCount);
    156             }
    157           PRINT(0)("\n\nGroup: [%s]\n\n", group->groupName);
    158           int optionCount = 0;
    159           group->walkThrough(Widget::listOptions, &optionCount, 0);
    160           PRINT(0)("\nWhich Option? [1-%d] ", optionCount);
    161           Option* option;
    162           while(true)
    163             {
    164               cin >> ans;
    165               int ansIp = atoi(ans);
    166               if (ansIp <= groupCount)
    167                 {
    168                   option = static_cast<Option*>(group->findOptionByNumber(&ansIp, 0));
    169                 break;
    170                 }
    171               else
    172                 PRINT(0)("\nChoose a smaler Number please: [1-%d] ", optionCount);
    173             }
    174           PRINT(0)("\n\n:: %s ::\n", option->title);
    175           option->changeOption();
    176 
    177           // here follows the rest.... this will be nasty.
    178           //! \todo move this into the gui-gtk-file
    179           //! \todo finish it.
    180         }
    181123    }
    182124
    183 #endif /* HAVE_GTK2 */
    184125}
Note: See TracChangeset for help on using the changeset viewer.