- if(atcptr != NULL) {
-
- atcmentry_list_type atcmlist = atcmentrylist_station[atcptr->get_ident()];
- //atcmentry_list_type atcmlist = atcmentrylist_station["EGNX"];
- atcmentry_list_iterator current = atcmlist.begin();
- atcmentry_list_iterator last = atcmlist.end();
-
- // Set all opt flags to false before displaying box
- fgSetBool("/sim/atc/opt0",false);
- fgSetBool("/sim/atc/opt1",false);
- fgSetBool("/sim/atc/opt2",false);
- fgSetBool("/sim/atc/opt3",false);
- fgSetBool("/sim/atc/opt4",false);
- fgSetBool("/sim/atc/opt5",false);
- fgSetBool("/sim/atc/opt6",false);
- fgSetBool("/sim/atc/opt7",false);
- fgSetBool("/sim/atc/opt8",false);
- fgSetBool("/sim/atc/opt9",false);
-
- //int yc = 10;
- int yc = 70;
- int xsize = 600;
-
- if ( atcmlist.size() != 0 ){
- int k=atcmlist.size();
- //int k = 3;
- //cout << "k = " << k << endl;
- int y = (fgGetInt("/sim/startup/ysize") - 200 - 20 - k*20);
- ATCMenuBox = new puDialogBox (100, y);
- ATCMenuFrame = new puFrame (0,0,xsize,yc+40);
- // loop over all entries in atcmentrylist
- ATCOptionsList = new puButtonBox (50, 50, 450, 50+(k*25), NULL, true);
- char** optList = new char*[k+1];
- int kk = 0;
- for ( ; current != last ; ++current ) {
- string dum;
- sprintf( buf, "%i", kk+1 );
- buf[1] = '\0';
- dum = (string)(buf);
- mentry[kk] = dum + ". " + current->menuentry;
- optList[kk] = new char[strlen(mentry[kk].c_str()) + 1];
- strcpy(optList[kk], mentry[kk].c_str());
- //cout << "optList[" << kk << "] = " << optList[kk] << endl;
- mtrans[kk] = current->transmission;
- //ATCMenuBoxMessage = new puText (10, yc);
- //ATCMenuBoxMessage -> setLabel( mentry[kk].c_str() );
- yc += 20;
- ++kk;
- }
- yc += 2*20;
- optList[k] = NULL;
- ATCOptionsList->newList(optList);