Commit Graph

8 Commits

Author SHA1 Message Date
nethack.allison
6177f4b871 win32 and wince
Remove the email address which is no longer valid from
several NetHack source files.
2005-01-23 19:39:01 +00:00
nethack.allison
21eaf22be4 win32gui message history; also clipboard support (from <Someone>)
- added 2 menu options: Copy ASCII Screenshot To Clipboard, Save
  ASCII Screenshot To File
- implemented saving message history
2003-10-13 14:48:13 +00:00
nethack.allison
27977b7c15 win32 stuff held until after bugfix release (from <Someone>)
-better handling of "more" prompt for messages that would have      scrolled off the window
-support perm_invent
-menu option to add/remove windows captions
2003-03-03 23:31:36 +00:00
nethack.allison
63e0b1ec2d (from <Someone>)
Two things:
1. This patch causes the window placement of the main window to be
written to the registry, and to be restored upon the next start
of the program. I had to move the creation of the main window to init_nhwindows,
as the registry is not read until then.

2.  Implement support for wc_popup_dialog (or rather, support for not having
popup windows.) It asks getlin questions and get_ext_cmd on the
message window, much like the TTY port does it.

The get_ext_cmd procedure is almost but not quite the same as the
one for TTY, and I think it is better: It autocompletes the extended
command you type, but if you keep on typing it doesn't add those letters
after the completed command, but just keeps track of how many (correct)
characters you typed. If you type a different character than the
autocompleted command has, it shows you what you typed again. If you
press backspace, it deletes the characters you typed, and if autocompletion
is no longer possible, it removes the autocompleted part. The effect
of this is that you can type as many letters as you want when typing
an extended command, as long as it is enough to identify one command;
and you only have to delete the characters you actually typed if you made
a mistake. I think autocompletion is a lot less obtrusive this way.

Some notes about the patch:
- Both mswin_getlin and mswin_get_ext_cmd now have two versions, with
  and without a popup.
- yn_question was changed so that it displays a caret, which is a lot
  nicer IMHO.
- I had to implement a new NetHack Windows Message parameter,
  "MSNH_MSG_CARET", to make it possible to show and hide the caret in
  the message window. Normally the caret is created and destroyed by the
  window that owns it, but in NetHack the input focus is always on the
  main window, while the caret is in the message window, which happens
  to be the only one that knows how large the caret should be.
- mswin_putstr_ex's last parameter changed from boolean to int; the
  semantics are enhanced so that a negative last parameter means "delete
  that many characters from the input line". The string to be deleted is
  passed in as well, although it is currently not used.
- A rather large chunk of code finds out where the last string that was
  displayed on the message window ended. This is necessary to place the
  caret at the right spot. The caret is always positioned there, even if
  it is hidden or non-existing.
- mswin_get_nh_event was changed to actually process and empty the
  message queue, and called from mswin_putstr_ex to make sure the
  message window is updated before the next step is done. Without this,
  the caret is positioned before the last message is painted, which
  makes its x-position after the last character of the previous line.
2002-03-27 12:17:26 +00:00
nethack.allison
3e582e40da (from <Someone>)
- added support for iflags.randomall (-@)
- echo yn_function selection to the message window (as From a bug report
2002-03-06 02:56:46 +00:00
nethack.allison
c0f875710b (from Yitzhak)
Support for a graphical RIP.

-verified for successful source compile and display
of tombstone upon death only.
2002-03-03 16:46:40 +00:00
nethack.allison
ad2e81c296 Fixes:
- B1026  [confirmed] win32: setting multiple options
- bugfix: menu: set focus to the item and make it visible when it is
selected  with accelerator key.
- increased menu font size by 1 point
- layout the main window on WM_MOVE message so the menu windows stays with
the main window  (it was not changing the location before)
- got rid of WinCE specific define (ARM)
- handle all keyboard input via WM_KEYDOWN instead WM_CHAR

Files affected: config1.h mhmsg.h mhmain.c mhmenu.c mswproc.c resource.h
winhack.rc

Notes:
 That overrides Yitzhak's mhmenu patch - I don't like the menu prompt on the
title bar since it can be null and in most cases it is. It looks much better
as a header column in the list and is displayed only if present.

I moved ARM-related (processor) defines to wceconf.h  You cannot undef ARM
before windows.h is processed - ARM version won't compile.

.rc files are generated by IDE - you cannot edit them directly or your
changes will be gone next time the file is saved. If anything needs to be
added to winhack.rc file manually it has to be marked by the following
defines or via menu option View->Resource Includes:
#define APSTUDIO_READONLY_SYMBOLS
...
#undef APSTUDIO_READONLY_SYMBOLS
2002-01-27 23:28:02 +00:00
nethack.allison
b79441dc5d Add WinHack source files to distribution 2002-01-13 05:27:55 +00:00