]> granicus.if.org Git - nethack/commitdiff
win32gui menu color attribute fix
authornhmall <mjnh@persona.ca>
Fri, 15 Jan 2016 04:02:09 +0000 (23:02 -0500)
committernhmall <mjnh@persona.ca>
Fri, 15 Jan 2016 04:02:09 +0000 (23:02 -0500)
from Alex Kompel...

doc/fixes36.1
win/win32/mhmenu.c

index bcc189206099c9872227016bc50828c46457c50a..301a6749c44a798fd3b235f04080d8d1364518e7 100644 (file)
@@ -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
index e7519a69e6694167bcec22f4aed09e8afadfc87c..74cee9880d37801a6d8a773d59bc994a275b2597 100644 (file)
@@ -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));
             }