void LevelMenuSelectUserInterface::processSelection(U32 index) { Parent::onActivate(); GameConnection *gc = getGame()->getConnectionToServer(); if((index & UPLOAD_LEVELS_BIT) && (index & (~UPLOAD_LEVELS_BIT)) < U32(mMenuDisplayItems.size())) { FolderManager *folderManager = mGameSettings->getFolderManager(); string filename = strictjoindir(folderManager->getLevelDir(), mMenuDisplayItems[index & (~UPLOAD_LEVELS_BIT)]); if(!gc->TransferLevelFile(filename.c_str())) getGame()->displayErrorMessage("!!! Can't upload level: unable to read file"); } else gc->c2sRequestLevelChange(index, false); // The selection index is the level to load getUIManager()->reactivateGameUI(); // Back to the game }