diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-04-11 10:49:36 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-04-11 10:49:36 +0000 |
commit | 294794073634d4aa598858ba8f577b95f606356d (patch) | |
tree | 7e27e63b134741eba35c7b125f7ffe1f4ff23ff4 /crawl-ref/source/invent.cc | |
parent | 6f24f856327baae51e8f95ccbbd485bca3d81104 (diff) | |
download | crawl-ref-294794073634d4aa598858ba8f577b95f606356d.tar.gz crawl-ref-294794073634d4aa598858ba8f577b95f606356d.zip |
* Allow viewing known items from "Use on what item?" scroll prompt.
* Default use_fake_cursor to true on Unix, else false.
* Tweak some descriptions.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9594 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/invent.cc')
-rw-r--r-- | crawl-ref/source/invent.cc | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc index 0a4fa56f33..6abb296c73 100644 --- a/crawl-ref/source/invent.cc +++ b/crawl-ref/source/invent.cc @@ -859,7 +859,7 @@ unsigned char InvMenu::getkey() const { unsigned char mkey = lastch; if (!isalnum(mkey) && mkey != '$' && mkey != '-' && mkey != '?' - && mkey != '*' && mkey != ESCAPE) + && mkey != '*' && mkey != ESCAPE && mkey != '\\') { mkey = ' '; } @@ -1514,7 +1514,8 @@ int prompt_invent_item( const char *prompt, const char other_valid_char, int excluded_slot, int *const count, - operation_types oper ) + operation_types oper, + bool allow_list_known ) { if (!_any_items_to_select(type_expect) && type_expect == OSEL_THROWABLE && oper == OPER_FIRE && mtype == MT_INVLIST) @@ -1589,6 +1590,13 @@ int prompt_invent_item( const char *prompt, NULL, &items ); + if (allow_list_known && keyin == '\\') + { + if (check_item_knowledge(true)) + keyin = '?'; + else + mpr("You don't recognise anything yet!"); + } need_getch = false; @@ -1625,12 +1633,22 @@ int prompt_invent_item( const char *prompt, } } else if (keyin == ESCAPE - || (Options.easy_quit_item_prompts - && allow_easy_quit && keyin == ' ')) + || (Options.easy_quit_item_prompts + && allow_easy_quit && keyin == ' ')) { ret = PROMPT_ABORT; break; } + else if (allow_list_known && keyin == '\\') + { + if (check_item_knowledge(true)) + { + keyin = '?'; + need_getch = false; + } + else + mpr("You don't recognise anything yet!"); + } else if (isalpha( keyin )) { ret = letter_to_index( keyin ); @@ -1642,7 +1660,7 @@ int prompt_invent_item( const char *prompt, } else if (!isspace( keyin )) { - // we've got a character we don't understand... + // We've got a character we don't understand... canned_msg( MSG_HUH ); } else |