void MechPurchaseScreen::endDrag( ) { if ( pDragMech ) { if ( inventoryListBox.pointInside( userInput->getMouseX(), userInput->getMouseY() ) ) { if ( !dragStartLeft ) { addMech( pDragMech ); } } else { if ( dragStartLeft ) removeMech( pDragMech ); } } inventoryListBox.undimAll(); variantListBox.undimAll(); pDragMech = NULL; }
void MechPurchaseScreen::addSelectedMech() { LogisticsMech* pMech = variantListBox.getCurrentMech(); if(pMech) { addMech(pMech); } variantListBox.disableItemsThatCostMoreThanRP(); int32_t curSel = variantListBox.GetSelectedItem(); if(curSel == -1) { variantListBox.SelectItem(-1); inventoryListBox.SelectItem(0); } }