Commit Graph
2507 Commits
Author SHA1 Message Date
Crissman Loomis aec687db2c Qt: use idClicked(); buttonClicked(int) is gone in Qt 6
Closes #1670
2026-09-11 10:06:18 -04:00
Crissman Loomis 55769ca9f0 fix Qt use-after-free reading the player name
Closes #1673
2026-09-11 10:02:18 -04:00
nhmall 96c564f09d Merge branch 'x11-bmp-gif' of https://github.com/chasonr/NetHack into NetHack-5.0 2026-09-09 11:23:34 -04:00
Ray Chason 2f42bd7e27 Display tabs in the text window
Actually a menu, but menu windows convert to text if only displaying
text.
2026-08-30 19:03:45 -04:00
Ray Chason 393130a629 Handle tabs in the message window 2026-08-30 17:51:10 -04:00
Ray Chason c88403f4ec Correct display of tabified PICK_NONE menu 2026-08-30 16:44:26 -04:00
Ray Chason 564affea88 Remove limit in size of widget_table
It is difficult, but possible, to exceed 1024 widgets. One way is to
set a very large Unicode symbol set, and then use #wizcustom. As there
is no limit to how many objects can occupy a square, this limit is a
possible hazard even to a normal game.
2026-08-30 15:52:15 -04:00
Ray Chason d9194cb4df Make hero visible at start
Scroll to make the hero visible when starting and when the main window
is resized.
2026-08-27 18:10:26 -04:00
Ray Chason f3e0dc49b8 Adjust screen height to allow for a task bar 2026-08-24 12:02:35 -04:00
Ray Chason a575fccf08 Add PNG support 2026-08-24 12:02:35 -04:00
Ray Chason cc47605531 Add BMP and GIF support 2026-08-24 12:02:35 -04:00
nhmall 97a6c131a9 Merge branch 'menu-columns' of https://github.com/chasonr/NetHack into NetHack-5.0 2026-08-24 07:28:33 -04:00
Ray Chason b61aef834e Set menu font to proportional 2026-08-22 20:46:13 -04:00
Ray Chason 7840d75365 X11: set menu font to proportional
Menus that needed to be tabified now are.
2026-08-22 20:43:46 -04:00
Ray Chason db32a639a7 Extend last column to end of line
If a line in the menu has fewer columns than the others, the last one
is deemed to extend to the right margin, and does not count toward the
maximum width of that column.

Also, revert the change to NetHack.font_menu.
2026-08-22 10:57:25 +03:00
Ray Chason cadde6d317 Use text window for display_file
The text window is assumed to use a monospaced font.
2026-08-22 10:57:25 +03:00
Ray Chason 84bf23640c Line up selectable items 2026-08-22 10:57:24 +03:00
Ray Chason ffb08d3be6 Don't set columns for rows without tabs 2026-08-22 10:57:24 +03:00
Ray Chason bc14bd7f30 Adjust extra menu width 2026-08-22 10:57:24 +03:00
Ray Chason ae8b4bf12a Add support for tabbed menu columns 2026-08-22 10:57:24 +03:00
Ray Chason 94834df5d1 Revise the column width calculation
The last column in a line continues to the end of the line, and may
overhang any subsequent columns in other lines.
2026-08-21 08:19:04 -04:00
0xb1aded c99b485c78 fix: init color256 value to prevent color flickering 2026-08-21 19:54:05 +08:00
Ray Chason c5181b9cb8 Improve support for tabbed columns
* Set the menu font to proportional
* Do not consider the last column of a line when calculating maximum
  column widths
* Use U+200A HAIR SPACE for finer column padding
* Track errors in column padding and adjust subsequent columns so that
  these errors do not accumulate across a row
2026-08-20 07:25:36 -04:00
Ray Chason 6dc9ac1c31 Adjust font hights so underscores are not cut off 2026-08-19 09:37:41 +03:00
Ray Chason b8dc070d07 Fix right side of border rectangle 2026-08-19 09:37:41 +03:00
Ray Chason 392142d322 For menu items, set up pixmap and then manage
The widget is created with a label but not a pixmap, and then a pixmap
is set up for display. If the label is already realized and managed, it
will not resize when the pixmap is set up. This causes problems when
the inventory window is updated: unlike other menus, the parent Form
widget is already realized. The fix is to create the item widget in an
unmanaged state (XtCreateWidget), set up the pixmap (X11_wrap_widget
and X11_set_attrs), and then manage it (XtManageChild).
2026-08-19 09:37:41 +03:00
Ray Chason e3170cdedc Provide more space between TTY-style status fields 2026-08-19 09:37:41 +03:00
Ray Chason 3f8e704231 More ifdefs; use Xft font to split messages 2026-08-19 09:37:41 +03:00
Ray Chason cada45a786 Apply appropriate #ifdefs and static declarations 2026-08-19 09:37:41 +03:00
Ray Chason 5883fe4abb Declutter the rendering code a bit 2026-08-19 09:37:41 +03:00
Ray Chason faba01dd25 Dismiss the text window on key press 2026-08-19 09:37:41 +03:00
Ray Chason 6e80039c49 Convert the tombstone window to Xft 2026-08-19 09:37:41 +03:00
Ray Chason 31f5ca334d Convert the text window to Xft 2026-08-19 09:37:41 +03:00
Ray Chason cfe67ecc62 Convert dialogs to Xft 2026-08-19 09:37:41 +03:00
Ray Chason 8ae58f9347 Convert the one line message prompt to Xft 2026-08-19 09:37:41 +03:00
Ray Chason 7c9cf20d1d Convert fancy status and menus to Xft 2026-08-19 09:37:41 +03:00
Ray Chason 9e57c85b16 Condition should be USE_XFT, not USE_XPM 2026-08-19 09:37:40 +03:00
Ray Chason 737b3ac89a Implement italic fonts 2026-08-19 09:37:40 +03:00
Ray Chason 9d1aac189e Convert TTY status to Xft 2026-08-19 09:37:40 +03:00
Ray Chason e53b76b0e5 Convert message window to use Xft 2026-08-19 09:37:40 +03:00
Ray Chason fbc586bf44 Convert map to use Xft 2026-08-19 09:37:40 +03:00
Ray Chason 23315cf857 Combine XLoadFont and XQueryFont calls
The separate calls crash if the font does not exist; the combined call
returns NULL, as the caller expects.

Resolves #1508 and possibly #569.
2026-08-18 13:40:35 +03:00
Pasi Kallinen 4652cd3ae7 Remove extra array indices 2026-08-14 11:08:26 +03:00
Ray Chason 0454838d13 Arrange labels more compactly 2026-08-14 11:08:26 +03:00
Ray Chason ddbea3b727 Implement remaining status labels 2026-08-14 11:08:26 +03:00
Ray Chason fbfac21aac Fix menu group accelerators
If there are, say, two or more potions in the menu, and multiple
selections are allowed, then '!' should select all potions. Such keys
were selecting only the first matching item.
2026-08-14 11:08:26 +03:00
Ray Chason 2d261f1398 Implement all text attributes for menus 2026-08-14 11:08:26 +03:00
Ray Chason 84ff4f8b7e Fix a null dereference when freeing fonts 2026-08-14 11:08:26 +03:00
Ray Chason 3398d250aa Implement blink on fancy status
and fix a bug with condition labels on the TTY status
2026-08-14 11:08:26 +03:00
Ray Chason 514669823b Implement bold, dim, italic, inverse, underline
Didn't get everything the last time.
2026-08-14 11:08:26 +03:00