(from <Someone>)

> - 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.
This commit is contained in:
nethack.allison
2002-08-20 00:04:34 +00:00
parent 6578eb1884
commit c5c963e5ca

View 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);
}