]> granicus.if.org Git - nethack/commitdiff
(from <Someone>)
authornethack.allison <nethack.allison>
Tue, 20 Aug 2002 00:04:34 +0000 (00:04 +0000)
committernethack.allison <nethack.allison>
Tue, 20 Aug 2002 00:04:34 +0000 (00:04 +0000)
> - When I pick up something, the count is displayed to the right.
>   I'd like this count to stay visible when I switch to another
>   item in the list.

win/win32/mhmenu.c

index e7558d2ee6183cbf8ed71df03d9a4292a68aadb8..f003142e181f7878ded2b78a5081b6c9ea278a9f 100644 (file)
@@ -900,7 +900,9 @@ BOOL onDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam)
        }
 
        /* draw focused item */
-       if( item->has_focus ) {
+       if( item->has_focus 
+        || (NHMENU_IS_SELECTABLE(*item) && 
+                       data->menu.items[lpdis->itemID].count!=-1)) {
                RECT client_rt;
 
                GetClientRect(lpdis->hwndItem, &client_rt);
@@ -932,8 +934,12 @@ BOOL onDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam)
                        DrawText(lpdis->hDC, wbuf, _tcslen(wbuf), &drawRect, 
                                         DT_RIGHT | DT_VCENTER | DT_SINGLELINE | DT_NOPREFIX );
                }
-
+    }
+    if (item->has_focus) {
                /* draw focus rect */
+               RECT client_rt;
+
+               GetClientRect(lpdis->hwndItem, &client_rt);
                SetRect( &drawRect, client_rt.left, lpdis->rcItem.top, client_rt.right, lpdis->rcItem.bottom );
                DrawFocusRect(lpdis->hDC, &drawRect);
        }