From: nethack.allison Date: Sun, 25 Aug 2002 12:29:35 +0000 (+0000) Subject: (from ) X-Git-Tag: MOVE2GIT~2462 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ea31aa03dced5d8d5dd9d144c3a387e5a8ae7a52;p=nethack (from ) > Questions are being appended in the message window, some showing > up on the same line. This is really noticeable with the > end-of-game disclosure questions. Questions should always be > presented on a new line. At end of game is probably the only place, since then more than one question is asked in the same turn. Anyhow, here's the patch, in mswproc.c [...] - No checkboxes in menu if menu is PICK_NONE. mhmenu.c - About box changed to splash screen. This last thing is open for discussion, as the splash screen currently does not give exactly the ame information as the about box (or the v command). Maybe the splash should be enhanced? Anyway, it looks better than the About-box. I didn't remove the About-box code and resource yet until this discussion is had. mhmain.c --- diff --git a/win/win32/mhmain.c b/win/win32/mhmain.c index 92b10bfea..6f0d04007 100644 --- a/win/win32/mhmain.c +++ b/win/win32/mhmain.c @@ -18,6 +18,7 @@ typedef struct mswin_nethack_main_window { static TCHAR szMainWindowClass[] = TEXT("MSNHMainWndClass"); static TCHAR szTitle[MAX_LOADSTRING]; +extern void mswin_display_splash_window(void); LRESULT CALLBACK MainWndProc(HWND, UINT, WPARAM, LPARAM); LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM); @@ -701,7 +702,7 @@ LRESULT onWMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam) switch (wmId) { case IDM_ABOUT: - DialogBox(GetNHApp()->hApp, (LPCTSTR)IDD_ABOUTBOX, hWnd, (DLGPROC)About); + mswin_display_splash_window(); break; case IDM_EXIT: diff --git a/win/win32/mhmenu.c b/win/win32/mhmenu.c index f003142e1..b56264562 100644 --- a/win/win32/mhmenu.c +++ b/win/win32/mhmenu.c @@ -821,11 +821,12 @@ BOOL onDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam) x = lpdis->rcItem.left + 1; - /* print check mark */ + /* print check mark and letter */ if( NHMENU_IS_SELECTABLE(*item) ) { + char buf[2]; + if (data->how != PICK_NONE) { HGDIOBJ saveBrush; HBRUSH hbrCheckMark; - char buf[2]; switch(item->count) { case -1: hbrCheckMark = CreatePatternBrush(data->bmpChecked); break; @@ -840,8 +841,8 @@ BOOL onDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam) SelectObject(lpdis->hDC, saveBrush); DeleteObject(hbrCheckMark); + } x += TILE_X + 5; - if(item->accelerator!=0) { buf[0] = item->accelerator; buf[1] = '\x0'; diff --git a/win/win32/mswproc.c b/win/win32/mswproc.c index a1c0ab24e..e14633468 100644 --- a/win/win32/mswproc.c +++ b/win/win32/mswproc.c @@ -1427,6 +1427,7 @@ char mswin_yn_function(const char *question, const char *choices, SendMessage(mswin_hwnd_from_winid(WIN_MESSAGE), WM_MSNH_COMMAND, (WPARAM)MSNH_MSG_CARET, (LPARAM)&createcaret ); + mswin_clear_nhwindow(WIN_MESSAGE); mswin_putstr(WIN_MESSAGE, ATR_BOLD, message); /* Only here if main window is not present */ @@ -1490,6 +1491,7 @@ void mswin_getlin(const char *question, char *input) SendMessage(mswin_hwnd_from_winid(WIN_MESSAGE), WM_MSNH_COMMAND, (WPARAM)MSNH_MSG_CARET, (LPARAM)&createcaret ); + mswin_clear_nhwindow(WIN_MESSAGE); mswin_putstr_ex(WIN_MESSAGE, ATR_BOLD, question, 0); mswin_putstr_ex(WIN_MESSAGE, ATR_BOLD, " ", 1); input[0] = '\0'; @@ -1562,6 +1564,7 @@ int mswin_get_ext_cmd() cmd[0] = '\0'; i = -2; + mswin_clear_nhwindow(WIN_MESSAGE); mswin_putstr_ex(WIN_MESSAGE, ATR_BOLD, "#", 0); len = 0; ShowCaret(mswin_hwnd_from_winid(WIN_MESSAGE));