(from <Someone>)
What's in it: some MessageBox tidbits: - Let all MessageBoxes display an icon - Introduced NHMessageBox to have messageboxes display a consistent title - Change icon in mswin_display_file from MB_ICONERROR to MB_ICONEXCLAMATION for non-fatal error And to solve #U355: NetHackW won't run on Win2K OS: - Avoid a crash when closing the main window while the splash screen is displayed. - Make sure NetHack starts normal when closed minimized - Center the splash screen on the screen, not on the parent window (which may be off-screen) What's new in it: - Show copyright banner in textbox in splash screen instead of over the picture - Show news in splash screen only if iflags.news (solves W341-6) - show complete version information in splash screen when it is used as about box) [Also reverse the numkey patch in main trunk]
This commit is contained in:
+13
-6
@@ -138,13 +138,13 @@ numpad[KEY_LAST][3] = {
|
||||
{'9', M('9'), '9'}, /* 9 */
|
||||
{'m', C('p'), C('p')}, /* - */
|
||||
{'4', M('4'), '4'}, /* 4 */
|
||||
{'5', M('5'), '5'}, /* 5 */
|
||||
{'g', 'G', 'g'}, /* 5 */
|
||||
{'6', M('6'), '6'}, /* 6 */
|
||||
{'+', 'P', C('p')}, /* + */
|
||||
{'1', M('1'), '1'}, /* 1 */
|
||||
{'2', M('2'), '2'}, /* 2 */
|
||||
{'3', M('3'), '3'}, /* 3 */
|
||||
{'0', M('0'), '0'}, /* Ins */
|
||||
{'i', 'I', C('i')}, /* Ins */
|
||||
{'.', ':', ':'} /* Del */
|
||||
};
|
||||
|
||||
@@ -438,7 +438,8 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPar
|
||||
|
||||
wp.length = sizeof(wp);
|
||||
if (GetWindowPlacement(hWnd, &wp)) {
|
||||
GetNHApp()->regMainShowState = wp.showCmd;
|
||||
GetNHApp()->regMainShowState = (wp.showCmd == SW_SHOWMAXIMIZED
|
||||
? SW_SHOWMAXIMIZED : SW_SHOWNORMAL);
|
||||
|
||||
GetNHApp()->regMainMinX = wp.ptMinPosition.x;
|
||||
GetNHApp()->regMainMinY = wp.ptMinPosition.y;
|
||||
@@ -472,9 +473,15 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPar
|
||||
NHEVENT_KBD('\033'); /* and send keyboard input as if user pressed ESC */
|
||||
/* additional code for this is done in menu and rip windows */
|
||||
}
|
||||
else if (!program_state.something_worth_saving)
|
||||
{
|
||||
/* User exited before the game started, e.g. during splash display */
|
||||
/* Just get out. */
|
||||
bail((char *)0);
|
||||
}
|
||||
else
|
||||
{
|
||||
switch(MessageBox(hWnd, TEXT("Save?"), TEXT("NetHack for Windows"), MB_YESNOCANCEL | MB_ICONQUESTION)) {
|
||||
switch (NHMessageBox(hWnd, TEXT("Save?"), MB_YESNOCANCEL | MB_ICONQUESTION)) {
|
||||
case IDYES: NHEVENT_KBD('y'); dosave(); break;
|
||||
case IDNO: NHEVENT_KBD('q'); done(QUIT); break;
|
||||
case IDCANCEL: break;
|
||||
@@ -761,9 +768,9 @@ LRESULT onWMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
mswin_destroy_reg();
|
||||
/* Notify the user that windows settings will not be saved this time. */
|
||||
MessageBox(GetNHApp()->hMainWnd,
|
||||
NHMessageBox(GetNHApp()->hMainWnd,
|
||||
"Your Windows Settings will not be stored when you exit this time.",
|
||||
"NetHack", MB_OK | MB_ICONINFORMATION);
|
||||
MB_OK | MB_ICONINFORMATION);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user