From ee430c5b3ea498d6110af07f7197da916541fb8a Mon Sep 17 00:00:00 2001 From: "nethack.allison" Date: Wed, 30 Jul 2003 01:17:12 +0000 Subject: [PATCH] win32gui: # to specifiy numeric count during loot wrote: > Windows NetHack graphical Version 3.4.1 > comments: I have been unable to remove or put in partial groups > of items into a bag of holding or scak. With hethack 3.3.X I > could put 2 of 3 potions or 3000 of 8000 pieces of gold into the > bag. The menu persents you with the following options (yn#aq)(n). > Using # exits the menu and typing in the number you wish to use > does nothing. The work around is to drop the number you wish to > not store and put all the remaining into the bag then pick up the > remaining. --- doc/fixes34.2 | 1 + win/win32/mswproc.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/doc/fixes34.2 b/doc/fixes34.2 index 4c7d13b07..d6fa71517 100644 --- a/doc/fixes34.2 +++ b/doc/fixes34.2 @@ -125,6 +125,7 @@ vms: create an empty paniclog file during playground installation win32tty: add subkeyvalue option to alter key values; Finnish keyboard fix win32tty: distinguish between black/gray/white (by Quietust) win32gui: prevent male Valkyrie and other incorrect startup settings +win32gui: allow numeric quantity count on item selection during loot win32: some code in files.c was incorrectly assuming that a file descriptor return value of 0 from open() was invalid but it could be valid on win32gui where stdin, stdout, stderr aren't open; diff --git a/win/win32/mswproc.c b/win/win32/mswproc.c index 8ddb0169c..5db32e490 100644 --- a/win/win32/mswproc.c +++ b/win/win32/mswproc.c @@ -1454,6 +1454,9 @@ char mswin_yn_function(const char *question, const char *choices, /* FYI: ch==-115 is for KP_ENTER */ if (def && (ch==' ' || ch=='\r' || ch=='\n' || ch==-115)) { result=def; + } else if( index(choices, '#') && isdigit(ch) ) { + yn_number = ch; + result = '#'; } else { mswin_nhbell(); /* and try again... */ -- 2.40.0