]> granicus.if.org Git - nethack/commitdiff
win32gui: # to specifiy numeric count during loot
authornethack.allison <nethack.allison>
Wed, 30 Jul 2003 01:17:12 +0000 (01:17 +0000)
committernethack.allison <nethack.allison>
Wed, 30 Jul 2003 01:17:12 +0000 (01:17 +0000)
<email deleted> 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
win/win32/mswproc.c

index 4c7d13b07b0fcf825ae1f4aca0b7a74041d5073f..d6fa715171921608c4b5ace054e394de85952151 100644 (file)
@@ -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;
index 8ddb0169c31cf8173c76a1fc87869811bdb3a59d..5db32e490be1a0306bc7ed4819e9c5d4fb3fadd9 100644 (file)
@@ -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... */