Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 3, 2005, 12:10:23 PM (21 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_gtk.cc

    r3312 r3313  
    5757
    5858/**
    59    \brief enters the GTK-main-loop
     59   \brief enters the GUI's main-loop
    6060*/
    6161bool mainloopGUI(void)
     
    6666  gdk_threads_leave();
    6767  delete Window::mainWindow;
    68 #endif /* HAVE_GTK2 */
     68#else /* HAVE_GTK2 */
     69  char boolAns = 'y';
     70  char ans[10];
     71  while(true)
     72    {
     73      PRINT(0)(" Listing all the Orxonox Options: \n");
     74      PRINT(0)("  #############################\n");
     75      Window::mainWindow->walkThrough(Widget::listOptionsAndGroups, 1);
     76     
     77      PRINT(0)("\nDo you want change any of the above values now? [Yn] ");
     78      cin >>boolAns ;
     79      if (boolAns =='n' || boolAns=='N')
     80        break;
     81     
     82      PRINT(0)("\n Listing all groups\n");
     83      PRINT(0)("  #################\n");
     84      int groupCount = 0;
     85      Window::mainWindow->walkThrough(Widget::listGroups, &groupCount, 1);
     86     
     87      PRINT(0)("\nIn which Group? [1-%d] ", groupCount);
     88      Packer* group;
     89      while(true)
     90        {
     91          cin >> ans;
     92          int ansIp = atoi(ans);
     93          if (ansIp <= groupCount)
     94            {
     95              group = static_cast<Packer*>(Window::mainWindow->findGroupByNumber(&ansIp, 1));
     96              break;
     97            }
     98          else
     99            PRINT(0)("\nChoose a smaler Number please: [1-%d] ", groupCount);
     100        }
     101      PRINT(0)("\n\nGroup: [%s]\n\n", group->groupName);
     102      int optionCount = 0;
     103      group->walkThrough(Widget::listOptions, &optionCount, 0);
     104      PRINT(0)("\nWhich Option? [1-%d] ", optionCount);
     105      Option* option;
     106      while(true)
     107        {
     108          cin >> ans;
     109          int ansIp = atoi(ans);
     110          if (ansIp <= groupCount)
     111            {
     112              option = static_cast<Option*>(group->findOptionByNumber(&ansIp, 0));
     113              break;
     114            }
     115          else
     116            PRINT(0)("\nChoose a smaler Number please: [1-%d] ", optionCount);
     117        }
     118      PRINT(0)("\n\n:: %s ::\n", option->title);
     119      option->changeOption();
     120     
     121      // here follows the rest.... this will be nasty.
     122      //! \todo move this into the gui-gtk-file
     123      //! \todo finish it.
     124    }
     125#endif /* HAVE_GTK2 */
     126 
    69127}
    70128
Note: See TracChangeset for help on using the changeset viewer.