(from <Someone>)

This patch implements Michael's idea to have a "NetHack mode" for
keypresses. It only does the Alt-keys now, but it should be easy
to extend to pressing space in dialogs; I left that out as we still
have to agree on a new dialog look.

The setting that you choose from the menu is stored in the registry.
Reading and writing the registry is done on init_nhwindows and
exit_nhwindows; there also is a menu item to delete the registry
settings (which makes sure they are not stored again this session.)
This provides a framework for future registry settings.

Also,
Alt-tab should show the app title when a menu or text window is up.

I left the app title as it was, although I still favour "Graphical
Version" or "With Graphics"; Anyway, that's only one resource string.
This commit is contained in:
nethack.allison
2002-03-08 22:23:04 +00:00
parent 416331f4d1
commit c58e5d7afd
8 changed files with 180 additions and 28 deletions
+9
View File
@@ -33,6 +33,8 @@
#define NHFONT_SIZE_MIN 3
#define NHFONT_SIZE_MAX 20
#define MAX_LOADSTRING 100
typedef struct mswin_nhwindow_data {
HWND win;
int type;
@@ -62,6 +64,9 @@ typedef struct mswin_nhwindow_app {
int mapDisplayModeSave; /* saved map display mode */
char* saved_text;
DWORD saveRegistrySettings; /* Flag if we should save this time */
DWORD regNetHackMode; /* NetHack mode means no Windows keys in some places */
} NHWinApp, *PNHWinApp;
#define E extern
@@ -129,6 +134,10 @@ void nhapply_image_transparent(
COLORREF cTransparent
);
void mswin_read_reg();
void mswin_destroy_reg();
void mswin_write_reg();
/* unicode stuff */
#ifdef UNICODE
#define NH_W2A(w, a, cb) ( WideCharToMultiByte( \