/* Remove the Transporter widgets from the screen */ void intRemoveTrans(void) { // Start the window close animation. IntFormAnimated *form = (IntFormAnimated *)widgGetFromID(psWScreen, IDTRANS_FORM); if (form) { form->closeAnimateDelete(); } intRemoveTransContent(); intRemoveTransDroidsAvail(); intMode = INT_NORMAL; }
/* Remove the Transporter widgets from the screen */ void intRemoveTrans(void) { W_TABFORM *Form; // Start the window close animation. Form = (W_TABFORM *)widgGetFromID(psWScreen, IDTRANS_FORM); if (Form) { Form->display = intClosePlainForm; Form->disableChildren = true; Form->pUserData = NULL; // Used to signal when the close anim has finished. ClosingTrans = true; } intRemoveTransContent(); intRemoveTransDroidsAvail(); intMode = INT_NORMAL; }
static void _intProcessTransporter(UDWORD id) { if (id >= IDTRANS_START && id <= IDTRANS_END) { /* A Transporter button has been pressed */ setCurrentTransporter(id); /*refresh the Contents list */ intAddTransporterContents(); } else if (id >= IDTRANS_CONTSTART && id <= IDTRANS_CONTEND) { //got to have a current transporter for this to work - and can't be flying if (psCurrTransporter != NULL && !transporterFlying(psCurrTransporter)) { unsigned currID = IDTRANS_CONTSTART; DROID *psDroid; for (psDroid = psCurrTransporter->psGroup->psList; psDroid != NULL && psDroid != psCurrTransporter; psDroid = psDroid->psGrpNext) { if (psDroid->selected) { continue; // Already scheduled this droid for removal. } if (currID == id) { break; } currID++; } if (psDroid != NULL) { transporterRemoveDroid(psCurrTransporter, psDroid, ModeQueue); } /*refresh the Contents list */ intAddTransporterContents(); if (onMission) { /*refresh the Avail list */ intAddDroidsAvailForm(); } } } else if (id == IDTRANS_CLOSE) { intRemoveTransContent(); intRemoveTrans(); psCurrTransporter = NULL; } else if (id == IDTRANS_CONTCLOSE) { intRemoveTransContent(); } else if (id == IDTRANS_DROIDCLOSE) { intRemoveTransDroidsAvail(); } else if (id >= IDTRANS_DROIDSTART && id <= IDTRANS_DROIDEND) { //got to have a current transporter for this to work - and can't be flying if (psCurrTransporter != NULL && !transporterFlying(psCurrTransporter)) { intTransporterAddDroid(id); /*don't need to explicitly refresh here since intRefreshScreen() is called by intTransporterAddDroid()*/ } } }