From: nhmall Date: Fri, 15 Jan 2016 04:02:09 +0000 (-0500) Subject: win32gui menu color attribute fix X-Git-Tag: NetHack-3.6.1_RC01~1023 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2a0c69700f5e1d80de99199acd57726c8735d81c;p=nethack win32gui menu color attribute fix from Alex Kompel... --- diff --git a/doc/fixes36.1 b/doc/fixes36.1 index bcc189206..301a6749c 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -130,6 +130,7 @@ unix: options file with CR+LF line ends and an invalid option line resulted in because embedded carriage return character changed cursor's position win32gui: getversionstring() was overflowing the provided Help About buffer win32gui: guard against buffer overflow in in mswin_getlin() +win32gui: handle menu_color attribute MacOSX: initial binary release was built from out of date source code that had 'BETA' and 'DEBUG' inappropriately enabled MacOSX: force TIMED_DELAY build option on so that 'runmode' run-time option diff --git a/win/win32/mhmenu.c b/win/win32/mhmenu.c index e7519a69e..74cee9880 100644 --- a/win/win32/mhmenu.c +++ b/win/win32/mhmenu.c @@ -1021,7 +1021,8 @@ onDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam) if (iflags.use_menu_color && (menucolr = get_menu_coloring(item->str, &color, &attr))) { - /* TODO: use attr too */ + SelectObject(lpdis->hDC, + mswin_get_font(NHW_MENU, attr, lpdis->hDC, FALSE)); if (color != NO_COLOR) SetTextColor(lpdis->hDC, nhcolor_to_RGB(color)); }