Commit Graph

811 Commits

Author SHA1 Message Date
PatR
ffeabfdf3b X11 default resources - macro expansion
The X11 interface reads file NetHack.ad (after cd'ing to the playground
directory, where 'make install' puts a copy) and feeds the contents to
X Windows for use as default resources to override the compiled in
defaults.  When use of #define was introduced into NetHack.ad (back in
September, 2016) this was severely hobbled and startup spit out a lot
complaints to stderr about invalid resource values.  This implements
rudimentary macro expansion for '#define name value' within the data
stream that's fed to X, getting back decent default values and
eliminating the invalid value complaints.
2017-10-11 17:29:55 -07:00
Pasi Kallinen
46217bbda2 Qt4: Put yn queries in message history
When using OPTIONS=popup_dialog, or compiling with USE_POPUPS,
the yes/no -questions weren't put into the message history.
2017-10-11 09:50:22 +03:00
Pasi Kallinen
76a47b5e34 Qt4: Save message history to dumplog 2017-10-11 01:06:07 +03:00
Pasi Kallinen
c6f0058e3d Qt4: Handle saving/loading message history 2017-10-11 00:32:39 +03:00
Pasi Kallinen
2fcf1ad139 Qt4: put and get message history 2017-10-10 22:55:30 +03:00
Pasi Kallinen
4dff3a707e Qt4: Pile mark 2017-10-10 21:47:35 +03:00
Pasi Kallinen
dbacc98a1d Qt4: Fix wrong condition in search blocking 2017-10-10 21:13:37 +03:00
Pasi Kallinen
257f17f8df Qt4: Don't segfault with QT_COMPACT 2017-10-10 20:18:04 +03:00
Pasi Kallinen
2fa61f9038 Qt4: Use generic putmixed routine 2017-10-10 19:56:51 +03:00
Pasi Kallinen
4f95d19ab7 Qt4: Prevent selecting all in pick-one menus 2017-10-10 19:28:03 +03:00
Pasi Kallinen
f06cf62a35 Qt4: Allow clicking anywhere in menus
Instead of requiring clicking on the checkbox, allow clicking
anywhere in a selectable line to select it.
2017-10-10 19:19:20 +03:00
Pasi Kallinen
76d223c178 Qt4: handle menu page selector keys
Qt4 doesn't do menu paging, so handle the select page, invert page,
and unselect page like selecting, inverting or unselecting all.
2017-10-10 18:20:34 +03:00
Bart House
c64ae2d28d Win32GUI: Clear selection counts for perm invent 2017-10-09 23:32:13 +03:00
Bart House
1ec7bed529 Win32GUI: Use a back buffer for all status rendering
This eliminates all flickering when status is updated.
2017-10-09 20:43:36 +03:00
Bart House
7c24b420a9 Win32GUI: Fix bug with specifying no color for status hilite.
We were mapping NO_COLOR to white instead of the default foreground color.
2017-10-09 14:57:34 +03:00
Bart House
b1f7bd3791 Win32GUI: Set main window background brush to black.
Black is a better choice given that the map background
will always be black. This also creates a better polished
experience when all window backgrounds are set to black.
2017-10-09 14:56:46 +03:00
Pasi Kallinen
6b51f6ce09 Qt4: Use TIMED_DELAY and same delay as tty 2017-10-08 11:28:28 +03:00
Bart House
8656807b4d Windows GUI supports WC2_HILITE_STATUS
Avoids raw_print on startup
2017-10-08 01:56:18 +03:00
Pasi Kallinen
583edab99f Qt4: Add menucolors
The Qt4 windowport already supported my 3.4.3 menucolors patch, so
adding that was simple.
2017-10-08 01:45:50 +03:00
Bart House
b744e2ce1f Win32GUI: Fix permanent inventory window going away
Fix bug where permanent inventory window would go away after
any operation that used the inventory window to pick items. Since
we were hiding the permanent inventory window, this would also
leave a space filled with white, creating jarring visual if
using dark themed window backgrounds.
2017-10-08 01:26:24 +03:00
Pasi Kallinen
ed335dd0a7 Add Qt4 windowport
Originally by Ray Chason for 3.4.3, based on the Qt windowport by
Warwick Allison. The look and feel is mostly the same.

Some improvements over the Qt 3 interface are:

* Panes are resizable
* Full support for IBMgraphics, and walls and corridors are drawn with
  graphical primitives for a continuous appearance no matter what the font
  says
* Lots of irritating glitches fixed
* Menus support proportional fonts correctly

Adding this because the old Qt windowport cannot be compiled on Qt4,
even with Qt3 compatibility stuff.

TODO:
 - background map glyphs
 - status hilites
 - menucolors
2017-10-08 01:15:02 +03:00
Bart House
f8760093cc Set the local working directory when debugging to $BinDir.
This is needed to ensure the defaults.nh is found.
2017-10-07 14:25:21 +03:00
PatR
67aaf4ef4c more !STATUS_HILITES - option parsing
When built without STATUS_HILITES, don't treat highlighting options as
if they were unknown.  This may need some tweaking; the feedback feels
a bit intrusive so perhaps 'statushilites' and 'hilite_status' should
just be ignored when not available.

'hitpointbar' now relies on wc2 handling instead of being conditionally
present.
2017-10-01 18:49:47 -07:00
PatR
63953bc062 !STATUS_HILITE warning fixes
Mostly declarations of static functions which don't exist (due to being
conditionally excluded).  One unused local variable.
2017-10-01 17:20:30 -07:00
Bart House
d51f74a507 Fix flashing issue that is seen with STATUS_HILITES in Windows port. 2017-10-01 14:32:43 +03:00
Pasi Kallinen
69f7a78dba Hilite Status: Improved
Allow defining multiple stops per field. Add hitpointbar.
2017-09-26 10:04:25 +03:00
Pasi Kallinen
98383f7a46 Win32GUI: Prevent ampersand-escaped mnemonics in menus 2017-09-18 15:30:52 +03:00
Pasi Kallinen
78e5c9a10a Win32GUI: Allow empty separator lines in menus 2017-09-17 12:17:46 +03:00
Pasi Kallinen
1e22a9aaf7 Win32GUI: Allow toggling mouse_support off
Prevents accidental mouse clicks on the map
2017-09-13 14:02:43 +03:00
Bart House
70ac8a12af Improvements to build.bat scripts used to build Windows builds. Remove CRT Secure warnings. 2017-09-05 13:14:13 +03:00
Bart House
51f7cb5e9d Fix build errors with Visual Studio 2017 using latest SDK. We have yet another global namespace collision between window headers and nethack headers. This time it is the macro Protection that is defined before it is used in a function prototype in the windows headers. 2017-09-04 12:56:20 +03:00
Bart House
1bc3cbac7f Additional changes needed to support Visual Studio 2017. 2017-09-04 12:56:20 +03:00
Bart House
8a5351c079 Upgrade to VS2017 and newer SDK. 2017-09-04 12:56:20 +03:00
Bart House
3614059379 Fix line endings (CRLF and extra space). 2017-09-04 12:56:20 +03:00
Bart House
5b08481637 Adding vs2015 solution file to starting set of files. 2017-09-04 12:56:19 +03:00
Bart House
ceaf2f6109 Create initial vs2017 files from vs2015 files. 2017-09-04 12:56:19 +03:00
Bart House
be4e0992e6 Fix crash that occurs when closing application window while invetory is displayed. 2017-09-04 12:52:18 +03:00
Bart House
497a0b47c8 Fixed compiler warhing of casting int to pointer. 2017-09-04 12:41:53 +03:00
Bart House
4a4193ab37 Fixed compiler warning using pointer as UINT. 2017-09-04 12:41:53 +03:00
Bart House
c9a82e8ae6 Fix compiler warning where we cast 32bit value to pointer. 2017-09-04 12:41:53 +03:00
Bart House
78bee88b83 Turning off CRT secure warnings. 2017-09-04 12:41:53 +03:00
Bart House
b54382ec78 Improvements to Visual Studio 2015 build. 2017-09-01 12:14:10 +03:00
Bart House
f9a6cf2bf7 Improvements to Visual Studio 2015 build. 2017-09-01 12:14:04 +03:00
Bart House
77bd37b435 Visual Studio 2015 build improvements. 2017-09-01 12:13:58 +03:00
Bart House
98266801b6 Improve Visual Studio 2015 build. 2017-09-01 12:13:52 +03:00
Bart House
e5dadd525f Visual Studio 2015 build improvements. 2017-09-01 12:13:30 +03:00
Bart House
5a4df357ab Improvements to vs2015 build. 2017-09-01 12:12:58 +03:00
Pasi Kallinen
1854d21dd7 Update NetHackW.exe version details 2017-08-20 23:44:35 +03:00
Pasi Kallinen
a2b51de481 Add stuff for compiling with Visual Studio 2015 2017-08-19 15:21:24 +03:00
Pasi Kallinen
189809a55c Rename terminate to nh_terminate so VS2015 can compile 2017-08-19 14:10:29 +03:00