type of item requested, then mpr() the message about it, rather than bringing up an empty menu with the message being the menu's title.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6105 c06c8d41-db1a-0410-9941-cceddc491573
KNCEMOC5TMWHTKCWF7CMYNHLGCXOLGMTXLEIHMEFBGM5FR26GRXAC Q5YUZONIIPGRWOIQNL6DHRGLKF4V3K5XSZCBH2SL7DP4WPLDNOSQC BLKWFGJ6AXMPG7I43RQZ3NBDNXBUJ7XWWRHB7KNRLHYBQKAYRCTAC KZIHM6RUX43HHKXG6HGJHVEEYUPVVNBFIWMT4SKPD2GAH5ZMA3KAC K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC FOQJ5S5WR7P7YMEWQ5Q4O7LTGLQ7LFVM4I2SG2Q7MIVC4PB2JHTQC XS4OT3JJKMXJIOMIGSSHIE4IOV2EXKFFELHEU7J2C2B7PKAP4V4QC MDAJYB6STTZPNHRQ2X66MMMSONMKXTESLHJSFPGN7H3D3TOVBAVAC ZGUJWUFJ4NFFJ6PGXLFGQWCWBCZHPWGWI44NJHJEVPRG5L36PADQC MJRXH3WGYWQK3PONPCZSAVOKSAGVJZCLXYA476KTEBAJZ744JJXAC 7V6TZHBSKK7AKY3SCYSP27QR2HP5N7HI3FI7V2QL7Y44OKKNI6IAC CE6FLTWU5PYFBSGVTIJXQXRMHOIHQ3VJCKHQVIMUUAIFHQ73X7NAC SDLKLUNFGVKDS55DDJZCBAVIB7NL3RRYPTACAY65SCUQKV6APFSAC 77H4BWWPPGLM3PLZH4QTAJRXIZTSDVNCOKZE223I437FN2UJ34RQC TM35IHKZZNBCMR3ERBS4EYHGUK5IVCPUT2JUITMT74AYAIUZSYFQC 57E4T664CXRFPVW2BZBYI33UIHFS4PSEZURZYPSYSZK5DRLJJ5CQC M2HMYLYYXSP5XGX6MCI77IT6UW5K4YSEUJWHPQPYXVSW5L36BJ2AC AZ2RCXNVULJUSCBDBK3VARTUCTPEJXHTA7ALP73S4EXLJB6YYB5QC SNTODFY3H2T4RLJ3BEMURGVHBWFJARLS6CFGZ2CVFFVKIH2DBBQAC BW3XFNOS6LDAQLHOZ6RXARCMKCY5JVLVDSXDSSAX4DSYM3FANQBAC 25CH7HH4LKXFIZ75YNMXS3TSXO6O27DYSOPLOD45K4OCNFWLS4LQC WMR7GLZK7374CFGJQNZKBAUTCZZSEKANVBKJOA5DHDD3KGC3FP7QC VSP2UVEASZS7NATQOC6C73SGVLLVVLFEPFSQKYGBM4I4D3HFE77QC TFNFP2YQA4EOVE4VIXBEQSGACZSXHWIQ2T4TIPQ46R2MJW2C4B5AC A7NKTYZ6VZC42TSSSDEWD5ROPE3P3M5I2QSNAVUMCYJ46PCXTDPQC Z7SW3IKYNXMOHHD77NGXN6RGL32PZBO6AIHLJY74IRO23AIRKWMQC 7YUGK5Q64KG5O7GJGTUBRRLHAHBCJ5YOE23YUPT6UBKUSB67CYAQC BWAQ3FHBBM6G3K3KYP75CRTR343RDQZJRYX5ZGYUEXYBAC3APDLAC }static std::string _no_selectables_message(int item_selector){switch (item_selector){case OSEL_ANY:return("You aren't carrying anything.");case OSEL_WIELD:case OBJ_WEAPONS:return("You aren't carrying any weapons.");case OSEL_UNIDENT:return("You don't have any unidentified items.");case OSEL_MEMORISE:return("You aren't carrying any spellbooks.");case OSEL_RECHARGE:return("You aren't carrying any rechargable items.");case OSEL_ENCH_ARM:case OBJ_ARMOUR:return("You aren't carrying any armour which can be enchanted ""further.");case OBJ_CORPSES:case OSEL_VAMP_EAT:return("You aren't carrying any corpses which you can drain.");case OSEL_DRAW_DECK:return("You aren't carrying any decks from which to draw.");case OBJ_FOOD:return("You aren't carrying any food.");case OBJ_SCROLLS:case OBJ_BOOKS:return("You aren't carrying any books or scrolls.");case OBJ_WANDS:return("You aren't carrying any wands.");}return("You aren't carrying any such object.");
std::string s;switch (item_selector){case OSEL_ANY:s = "You aren't carrying anything.";break;case OSEL_WIELD:case OBJ_WEAPONS:s = "You aren't carrying any weapons.";break;case OSEL_UNIDENT:s = "You don't have any unidentified items.";break;case OSEL_MEMORISE:s = "You aren't carrying any spellbooks.";break;case OSEL_RECHARGE:s = "You aren't carrying any rechargable items.";break;case OSEL_ENCH_ARM:case OBJ_ARMOUR:s = "You aren't carrying any armour which can be enchanted ""further.";break;case OBJ_CORPSES:case OSEL_VAMP_EAT:s = "You aren't carrying any corpses which you can drain.";break;case OSEL_DRAW_DECK:s = "You aren't carrying any decks from which to draw.";break;case OBJ_FOOD:s = "You aren't carrying any food.";break;case OBJ_SCROLLS:case OBJ_BOOKS:s = "You aren't carrying any books or scrolls.";break;case OBJ_WANDS:s = "You aren't carrying any wands.";break;default:s = "You aren't carrying any such object.";break;}set_title(s);
set_title(_no_selectables_message(item_selector));
bool prompt_failed(int retval, std::string msg){if (retval != PROMPT_ABORT && retval != PROMPT_NOTHING)return false;if (msg.empty()){if (retval == PROMPT_ABORT)canned_msg(MSG_OK);}elsemprf(MSGCH_PROMPT, msg.c_str());crawl_state.cancel_cmd_repeat();return true;}
if (which_inventory_slot == PROMPT_ABORT){canned_msg( MSG_OK );
if (prompt_failed(which_inventory_slot))