Changeset 3313 in orxonox.OLD for orxonox/branches/updater/src/gui
- Timestamp:
- Jan 3, 2005, 12:10:23 PM (20 years ago)
- Location:
- orxonox/branches/updater/src/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/updater/src/gui/orxonox_gui.cc
r3312 r3313 120 120 else 121 121 { 122 #ifdef HAVE_GTK2123 122 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 else155 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 else172 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-file179 //! \todo finish it.180 }181 123 } 182 124 183 #endif /* HAVE_GTK2 */184 125 } -
orxonox/branches/updater/src/gui/orxonox_gui_gtk.cc
r3312 r3313 57 57 58 58 /** 59 \brief enters the G TK-main-loop59 \brief enters the GUI's main-loop 60 60 */ 61 61 bool mainloopGUI(void) … … 66 66 gdk_threads_leave(); 67 67 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 69 127 } 70 128
Note: See TracChangeset
for help on using the changeset viewer.